#I m having trouble using state class
1 messages · Page 1 of 1 (latest)
in my sensors.yaml I have this:
- platform: template sensors: ups_power_usage: friendly_name: "UPS Power Usage" unit_of_measurement: "kWh" value_template: "{{ (states('sensor.ups_load_2') | float / 100) * 900 / 1000 }}" state_class: total_increasing device_class: energy
That's indeed the legacy format, which doesn't support state class
copy that... if I create a templates.yaml and !include it, do I have to move every template entity over, or can I just create this new one and any new ones going foward?
You can use them besides each other
super helpful, thanks. Last question, will quick reload load new/updated template entities or do I need to do a full bound?
bounce
You might need a restart if you didn't use the template integration before
got it! Thanks again!
this worked... but the device still isn't available to the energy dashboard .... thought I'd emulated other engergy meter devices successfully
What are the current attributes for your new sensor?
state_class: measurement
unit_of_measurement: kWh
device_class: energy
icon: mdi:server
friendly_name: UPS Power Usage
the current state is 0.0.667
oops 0.667
Check in devtools > statistics for issues with the sensor