Hello Everyone,
I managed to set up some basic stuff see screenshot.( https://i.imgur.com/8dlMNRG.png ) but at first i am having issues with a smart plug with power meter.
When the plug is in ON state, the power meter works fine. But when it’s off , it’s stuck with the last info.
It’s the Boiler 1 and Boiler 2
At the moment the template is :
- sensor:
- name: "Boiler 1 Power Usage"
unit_of_measurement: "W"
state_class: 'measurement'
device_class: 'power'
state: "{{ states('sensor.boiler_1_power') | int / 10 | round(1) }}"
But i would like to achieve something like . If state OFF then to return value 0 . If on then the value of :
{{ states(‘sensor.boiler_1_power’) | int / 10 | round(1) }}
Is it possible ?
Thanks,