#only start when a different automation has NOT

1 messages · Page 1 of 1 (latest)

wind tinsel
#

Hey guys,

For my vacuuming schedule i would like to start one of my automations only on days where another automation (that runs every 4 days) has NOT run today.

the reason is, my vacuum does a whole ground-floor-clean every 4 days. i want the kitchen to be vacuumed EVERY evening though. now obviously it does not have to do it when it already did the whole floor level just a couple hours before.

#

okay i did figure it out. here's a solution if anyone has a similar problem... use this as a condition template

#

condition: template
value_template: >-
{{ now() - state_attr('automation.vacuum_full_clean', 'last_triggered') |
default( as_datetime('0'), true) > timedelta(hours=24)}}