I have a Roborock connected via the Roborock cloud integration to my HA server.
At the moment I have the following automation set up to start cleaning (and send me and my girlfriend a push notification) at most once a day, as soon as everyone leaves home:
# When everybody leaves home
triggers:
- entity_id: zone.home
to: "0"
trigger: state
# If it's the first time this automation triggers today
conditions:
- condition: template
value_template: >-
{{ this.attributes.last_triggered is none or
this.attributes.last_triggered < today_at() }}
actions:
# Start default cleaning
- device_id: <D_ID>
domain: vacuum
entity_id: <E_ID>
type: clean
# Send push notifications
- action: notify.mobile_app_1
metadata: {}
data:
message: _ started cleaning
- action: notify.mobile_app_2
metadata: {}
data:
message: _ started cleaning
mode: single
and everything has been working great so far. I would like to enhance it by having the robot perform a vacuum+mop routine every other time (or even every third time) and vacuum-only otherwise.
I can think about one possible implementation creating 2 different automations that deactivate themselves after executing and activate the other one - but is there a smarter way to achieve the same result?
Also please review my automation and let me know if anything else can be improved 🙂
Thanks a lot!