Here is an integration to retrieve PiJuice values in Home Assistant sensors.
- Battery status
- Power input status
- Power input I/O status
- Charge in %
- Temperature (native format)
- Battery voltage
- Battery current
- I/O voltage
- I/O current
To make the Pi Juice Hat accessible and the integration working, this is required that I2C is enabled in th host system.
- If you use Home Assistant Operating System, follow the official documentation : https://www.home-assistant.io/common-tasks/os/#enable-i2c
- If you use Docker or Core version of Home Assistant, activate I2C depending on your host OS.
Use HACS. This will also inform you when there are new releases and you can update easily. If installed this way, you can proceed to configuration either using the Integrations Page or Configuration.yaml (legacy).
If you are not familiar with HACS, please check the usage.
- Using the tool of your choice (SSH, Samba, ...), open the directory of ther HA configuration (where you find
configuration.yaml
). - If you do not have a
custom_components
directory, create it. - Inside the
custom_components
directory, create a new folder calledpijuice
. - Download all the files from the
custom_components/pijuice/
repository to this directorycustom_components\pijuice
.
Whatever the installation of this integration used, you need to activate the integration to your configuration file (using share folder or addon to access to it).
Here is a complete configuration with all entities activated :
sensor:
- platform: pijuice
monitored_conditions:
- battery_status
- power_input_status
- power_input_io_status
- charge
- temperature
- battery_voltage
- battery_current
- io_voltage
- io_current
If no "monitored_conditions" is setup, all sensors will be added to Home Assistant as Entities.
PiJuice : PiJuice Pi supply hardware/software platform to support Raspberry Pi, Arduino, ...
Home Assistant : Home Assistant open-source powerful domotic plateform.
HACS : Home Assistant Community Store gives you a powerful UI to handle downloads of all your custom needs.
smbus2 library : PyPI library for I2C access