I have a vacuum (rockobo s50 with valetudo re on it) and an alarm system managed by HA.
I’ve setup an automation to change alarm type when vacuum starts cleaning the house:
- alias: Cambia tipo allarme da away a home se R2D2 è in funzione
initial_state: 'on'
trigger:
- platform: state
entity_id: vacuum.rockrobo
to: 'cleaning'
condition:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: 'armed_away'
action:
- service: alarm_control_panel.alarm_disarm
data: {"entity_id":"alarm_control_panel.home_alarm"}
- delay: 02:00
- service: alarm_control_panel.alarm_arm_home
data: {"entity_id":"alarm_control_panel.home_alarm"}
Now I would like an automation to restore alarm previous state after vacuum is back to docking station.
Then use something like this (consider adding another condition which checks that you’re still away incase you arrived home while the vacuum is running):
- alias: Set Home Alarm to Away when Vacuum Docks
trigger:
- platform: state
entity_id: vacuum.rockrobo
to: "docked"
condition:
- condition: state
entity_id: input_boolean.vacuum_disarmed_away_alarm
state: 'on'
action:
- service: alarm_control_panel.alarm_arm_away
entity_id: alarm_control_panel.home_alarm
- service: input_boolean.turn_off
entity_id: input_boolean.vacuum_disarmed_away_alarm
Actually it turns from armed away (triggered by internal motion sensor) to home (triggere by door/windows sensor). It’s a compromise to have the house cleaned and “almost” safe.