I have an automation which uses a tasmota POW device (Sonoff) to read Power Usage and determine if the Washing Machine is on or off:
binary_template.yaml:
- platform: template
sensors:
washing_machine:
friendly_name: "Washing Machine"
value_template: "{{ states('sensor.tasmota_5087e5_2021_energy_power')|float > 2.0 }}"
Problem is, during a cycle, the washing machine will occasionally consume less than 2 watts and it switches binary_sensor.washing_machine to off (causing downstream automations to trigger).
How do I expand this to say, before it switches the binary_sensor to off, ensure the value_template is false for 5 minutes? (ie. the power usage has been 0w for 5 minutes)
Thanks