Also set the state class in HA sensors example

This commit is contained in:
Paul van Tilburg 2023-01-13 23:22:41 +01:00
parent 4088c37cd2
commit 536b1564b9
Signed by: paul
GPG Key ID: C6DE073EDA9EEC4D
1 changed files with 2 additions and 0 deletions

View File

@ -134,6 +134,7 @@ sensors:
value_template: '{{ value_json.current_w }}'
unit_of_measurement: W
device_class: power
state_class: measurement
- platform: rest
name: "Photovoltaic Invertor Total Energy Production"
@ -141,6 +142,7 @@ sensors:
value_template: '{{ value_json.total_kwh }}'
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
```
This assumes your Solar Grabber is running at <http://solar-grabber.domain.tld:2399>.