Hi all,
I have a couple of simple automations that send an email when my washer, dryer or dishwasher is done.
Each appliance is plugged into a power-metering smart plug and the automation is simply put "when power drops below x Watts for y minutes, send email".
Going local by replacing my Wifi equipment with Zigbee, the power sensor occasionally becomes unavailable and this causes the automation to fire, when it becomes available again and is below the threshold. This never used to happen with Wifi and it's obviously due to the behaviour/settings of the Mosquitto MQTT.
I've changed the trigger from a simple numeric one to a template trigger
{{ is_number(states('sensor.zb_plug_washer_power')) and (states('sensor.zb_plug_washer_power') | float < 30) }}
(for 10 min) and it seems to do the trick.
Is this the way or is there something better? I understand that template automations are not exactly light weight.