Hi there, new to home assistant and am trying to get my head around how I could make my simple automation a little more advanced. At the moment my routine is triggered when the family group leaves home, this will turn any switches that are left on to off and set off my Roborock S5 vacuum cleaners if they haven’t been run that day. I would like it, that if the family group changes to home then the hoovers would return to the dock if they are still cleaning and resume where they left off when we leave again. repeat and rinse until the cleaning is finished. Is this even possible? If it is, it is a bit beyond my scope and I would require some help. Here is what I have so far.
alias: Leaving Home
description: ''
trigger:
- platform: zone
entity_id: person.james
zone: zone.home
event: leave
- platform: zone
entity_id: person.hannah
zone: zone.home
event: leave
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: group.family
state: not_home
- condition: state
entity_id: sensor.vacuuming_time_today
state: '0.0'
sequence:
- device_id: c726566132d3df5bce46d8465231f0c7
domain: vacuum
entity_id: vacuum.roborock_vacuum_s5_2
type: clean
- device_id: eb6d328b3e64faffbdb8a90a5cfb6448
domain: vacuum
entity_id: vacuum.roborock_vacuum_s5
type: clean
- service: switch.turn_off
target:
area_id:
- bathroom
- bedroom
- guest_bedroom
- hall
- landing
- kitchen
- living_room
- loft
- nicole_s_bedroom
- office
- outside
- toilet
- utility
default:
- service: switch.turn_off
target:
area_id:
- bathroom
- bedroom
- guest_bedroom
- hall
- landing
- kitchen
- living_room
- loft
- nicole_s_bedroom
- office
- outside
- toilet
- utility
mode: single
Many thanks for looking at this.