Hello Everyone,
Im quite new to the home assistant world.
Currently im using an automation that triggers when noone is at home and the vacuum starts.
Sometimes i dont want it to start and get a notification with some kind of timer to cancel it. When i do nothing it starts a usual.
Here is my current skeleton with curicial parts missing.
alias: Clean when leaving
description: ""
trigger:
- platform: state
entity_id:
- person.x
- person.y
from: home
to: not_home
condition:
- condition: and
conditions:
- condition: state
entity_id: person.y
state: not_home
- condition: state
entity_id: person.x
state: not_home
- condition: template
value_template: >-
{{ now() - states('sensor.roborock_last_clean_end') | as_datetime |
as_local > timedelta(hours=16) }}
alias: Last clean time check
- condition: state
entity_id: input_boolean.roborock_routine
state: "on"
- condition: state
entity_id: input_boolean.guest_mode
state: "off"
action:
- service: notify.notify
data:
message: Roborock will start cleaning in 5 minutes
data:
actions:
- action: CANCEL_CLEANING_START
title: cancel cleaning
- device_id: xxxxxxxxxxxxxxxxxxxxxxxx
domain: vacuum
entity_id: vacuum.roborock
type: clean
mode: single
any ideas?