I am using a smart plug for our electric fireplace stand. I want to utilize the smart plug electric consumption to tell if the fireplace is running or not. I’ve tried creating template where if the value is higher than 5 would display On. It would be easier if I could use on/off for when the fireplace is running and just be able to keep the smart plug always on for the wife.
template:
- sensor:
- name: "Fireplace Status"
state: >
{% if states("sensor.fireplace_electric_consumption_w", 'W')|float == 0 %}
No Power
{% elif states("sensor.fireplace_electric_consumption_w", 'W')|float <= 5 %}
Off
{% elif states("sensor.fireplace_electric_consumption_w", 'W')|float >= 5 %}
On
{% else %}
Unavailable
{% endif %}
Tried to mirror the kettle template example but is not working for me at least. Appreciate any assistance.