I am having a really weird problem here… I have a set of automations that turns on the pond filter during the day after rain stops if it is above a certain temperature and has not been cleaned in the last hour already. This part works great thanks to some help from everyone here!
Now… that cleaning process is supposed to automatically stop after 20 minutes and has worked great for several weeks. With a really wet spring this has had plenty of exercise. I have not updated home assistant to v .72 so it wouldn’t have been a system upgrade that broke it, but it seems that the stop cleaning automation suddenly stopped working as I came home from work two days in a row to find the pump on for 8+ hours. Does anyone have any idea what the issue with the code below is??
##########################################################
# Turn On Pond Filter After Rain Stops
##########################################################
- alias: "Clean pond after rain"
trigger:
- platform: state
entity_id:
- sensor.dark_sky_icon
from: 'rain'
condition:
condition: and
conditions:
- condition: state
entity_id: sun.sun
state: 'above_horizon'
- condition: state
entity_id: switch.waterfallpump
state: 'off'
- condition: numeric_state
entity_id: sensor.dark_sky_temperature
above: 45
- condition: template
value_template: '{{ (as_timestamp(now()) - as_timestamp(states.automation.clean_pond_after_rain.attributes.last_triggered | default(0)) | int > 3600)}}'
action:
- service: homeassistant.turn_on
entity_id:
- input_boolean.auto_waterfallpump
- switch.waterfallpump
##########################################################
# Turn Off Pond Filter After Cleaning Cycle
##########################################################
- alias: 'Pond cleaning complete'
trigger:
- platform: state
entity_id: input_boolean.automation_triggered_pump
to: 'on'
for:
minutes: 20
action:
- service: homeassistant.turn_off
entity_id:
- input_boolean.auto_waterfallpump
- switch.waterfallpump
I even attempted to swap out the used-to-be working state trigger with a template trigger to no avail.
- platform: template
value_template: '{{ (as_timestamp(now()) - as_timestamp(states.automation.clean_pond_after_rain.attributes.last_triggered | default(0)) | int > 1200)}}'
Any help would be amazing. I have rebooted the server, and have ensured the host time is correct so I am not sure what is up. Thanks!