Since Xiaomi Roborock S5 can only do 5 zones at a time, I’m trying to set up an automation that’ll continue on to the remaining 5 zones once it did the first 5.
For now the zones are static, but I can’t seem to make the automation trigger, neither with a template or state. I know it works beyond the trigger, because I can trigger it manually/with a timed trigger.
I need it to trigger when status changes to ‘Returning to dock’ (optionally from status ‘Cleaning’). I’ve tried many versions, with templates or states (with a status sensor), but none seem to trigger. Initial state is ‘off’ because it’s turned on elsewhere (works).
Any ideas? Can use state instead of template if anyone knows how to get that working.
- alias: Vacuum next 5 zones
initial_state: 'off'
trigger:
platform: template
value_template: "{{ is_state_attr('vacuum.xiaomi_vacuum_cleaner', 'status', 'Returning to dock') }}"
condition:
condition: template
value_template: "{{ state_attr('vacuum.xiaomi_vacuum_cleaner', 'battery_level') > 19 }}"
action:
- service: vacuum.pause
data:
entity_id: vacuum.xiaomi_vacuum_cleaner
- delay: '00:00:01'
- service: vacuum.send_command
data:
entity_id: vacuum.xiaomi_vacuum_cleaner
command: app_zoned_clean
params: [[15294,28996,18144,31296,1],
[13867,32540,19817,36890,1],
[11034,32889,13884,36939,1],
[14460,23095,19410,25645,1],
[21386,22704,25486,25154,1]]
- service: automation.turn_off
entity_id: automation.vacuum_next_5_zones