Dear Community,
I am very happy that ha supports energy monitoring now. Thanks to everybody who contributed to this cool and useful feature.
I am trying to set up some monitoring with custom sensors. But the sensor isn’t showing up in the add consumption list.
It’s a rest sensor based on this json:
{“name”:“Daten PV-Anlage”,“consumption”:“14970.899”,“consumptionTimestamp”:“2021-10-18T20:20:30”,“state_class”:“total”,“device_class”:“energy”}
configured like this in configuration.yaml:
name: AktuellerBezug2
json_attributes:
- consumption
- consumptionTimestamp
- state_class
- device_class
value_template: '{{ value_json.consumption }}'
unit_of_measurement: 'kWh'
And the entity shows up in the developer tools like this:
What am I doing wrong? In my opinion I set the state_class and units according to the guide (Sensor Entity | Home Assistant Developer Docs)
Any ideas?
Thanks a lot