This is an attempt at a standalone Powersensor integration with Home Assistant. Kudos to @izevaka for figuring out the sensor interface.
- Make the connection more robust (reconnect/close etc)
- Add extra sensors
- Improve testing
HACS is recommended as it provides automated install and will notify you when updates are available.
This assumes you have HACS installed and know how to use it. If you need help with this, go to the HACS project documentation.
Add custom repository in HACS
- Click on HACS in your menu to open the HACS panel, then click on integrations (https://your.domain/hacs/integrations).
- Click on the 3 dots in the top right corner.
- Select "Custom repositories"
- Add the URL to the repository:
https://github.com/drc38/DiUS_Powersensor
- Select the integration category.
- Click the "ADD" button.
Once done, you should see the new repository, appearing in a list like this. Click the Download button
- Using the tool of choice open the directory (folder) for your HA configuration (where you find
configuration.yaml
). - If you do not have a
custom_components
directory (folder) there, you need to create it. - In the
custom_components
directory (folder) create a new folder calleddius
. - Download all the files from the
custom_components/dius/
directory (folder) in this repository. - Place the files you downloaded in the new directory (folder) you created.
- Restart Home Assistant
- In the HA UI go to "Integrations" click "+" and search for "DiUS_Powersensor"
Configuration of the integration is done within the Integrations Panel in Home Assistant.
- Navigate to Integrations
- Click Add Integration
- Search for DiUS Powersensor
- Find your plug/gateway's IP address in the Powersensor mobile app
- Enter the IP address in the configuration, NB set your router to prevent the IP changing. Click Submit
- Click Configure on the newly created integration. By default the Main Power sensor and Plug sensor are selected, they can be unselected by clicking Configure. A power offset can also be applied to sensor readings eg -100W.
If you want to contribute to this please read the Contribution guidelines
This project was generated from @oncleben31's Home Assistant Custom Component Cookiecutter template.
Code template was mainly taken from @Ludeeus's integration_blueprint template