Last active
January 2, 2025 18:31
-
-
Save user-x-adm/38ca8b9ad413a4d961305c7b1b8dda69 to your computer and use it in GitHub Desktop.
HA-configuration-yaml-powerfox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # put this in your configuration.yaml to get sensor data from powerfox.de | |
| rest: | |
| - authentication: basic | |
| username: !secret ovag-user | |
| password: !secret ovag-pw | |
| scan_interval: 15 | |
| resource: https://backend.powerfox.energy/api/2.0/my/main/current?unit=kwh | |
| sensor: | |
| - name: "poweropti" | |
| json_attributes: | |
| - "Watt" | |
| - "Timestamp" | |
| - "A_Plus" | |
| - "A_Minus" | |
| - "Outdated" | |
| template: | |
| - sensor: | |
| - name: "Strom-OVAG-aktuell" | |
| unit_of_measurement: "W" | |
| device_class: "power" | |
| state_class: "measurement" | |
| unique_id: "strom_aktuell" | |
| state: > | |
| {{ state_attr('sensor.poweropti', 'Watt') }} | |
| - name: "Strom-OVAG-Bezug" | |
| unit_of_measurement: "kWh" | |
| device_class: "energy" | |
| state_class: "total_increasing" | |
| unique_id: "strom_bezug_kwh | |
| state: > | |
| {{ state_attr('sensor.poweropti', 'A_Plus') }} | |
| - name: "Strom-OVAG-Netz-Lieferung" | |
| unit_of_measurement: "kWh" | |
| device_class: "energy" | |
| state_class: "total_increasing" | |
| unique_id: "strom_lieferung_kwh" | |
| state: > | |
| {{ state_attr('sensor.poweropti', 'A_Minus') }} | |
| # |
Author
Nice: chatGPT found the missing " after unique_id: "strom_bezug_kwh for me
;-)
Hello, unfotunately it does not work for me. What do i need to fill in besides my account details? How do i get the unique ID for the sensors?
Leider funktioniert das bei mir nicht. Die Powerfox app läuft normal. Jemand ne Idee?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have added the "unique_id:" Based on this configuration, you can change some settings of this sensor in the GUI/dashboard.