I thought I’d share this with all of you guys to save you these few minutes of tinkering for your vacuum automations -
The bin full, getting stuck automations are pretty self explanatory
The start roomba while we are away
automation comes from a very good idea of one of the other community members (if you’re reading this, please PM me and I’ll give proper credits) - start roomba automatically if 2 days have passed since last trigger and while we’re away for work
- alias: 'Roomba bin full'
trigger:
platform: template
value_template: "{%if is_state_attr('vacuum.grisha', 'bin_full', true) %}true{%endif%}"
action:
- service: notify.gmail_notifier
data:
message: 'Roomba bin is full, please empty it'
- alias: 'Roomba is stuck'
trigger:
platform: template
value_template: "{%if is_state_attr('vacuum.grisha', 'status', 'Stuck') %}true{%endif%}"
action:
- service: notify.gmail_notifier
data:
message: 'Roomba got stuck, you should really check on it'
- alias: Start Roomba while we are away
trigger:
platform: state
entity_id: group.adults
from: 'home'
to: 'not_home'
for:
hours: 1
condition:
condition: and
conditions:
- condition: time
after: '07:00:00'
before: '14:00:00'
- condition: template
value_template: '{{ as_timestamp(now()) - as_timestamp(states.automation.start_roomba_while_we_are_away.attributes.last_triggered) | int > 172800 }}'
action:
- service: vacuum.turn_on
data:
entity_id: vacuum.grisha