https://gist.github.com/user-x-adm/38ca8b9ad413a4d961305c7b1b8dda69
Hier der Link
Hier der Link
YAML:
# 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"
state: >
{{ state_attr('sensor.poweropti', 'Watt') }}
- name: "Strom-OVAG-Bezug"
unit_of_measurement: "kWh"
device_class: "energy"
state_class: "total_increasing"
state: >
{{ state_attr('sensor.poweropti', 'A_Plus') }}
- name: "Strom-OVAG-Netz-Lieferung"
unit_of_measurement: "kWh"
device_class: "energy"
state_class: "total_increasing"
state: >
{{ state_attr('sensor.poweropti', 'A_Minus') }}
Zuletzt bearbeitet von einem Moderator: