I would like to use a for statement to prevent bouncing on an automation based on power readings.
IE when the power goes below a specific value for a few seconds.
- alias: Washer cycle complete
trigger:
platform: numeric_state
entity_id: switch.washer
value_template: '{{ state.attributes.current_power_w | int }}'
below: 7
for:
seconds: 30
The below trigger alone works most of the time but I sometimes get extra triggers as the washer reaches the end of the cycle and bounces below 7. Adding the for value however does not validate.
Is this supposed to work or is there another way I could do this?