Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - alias: Vacuum Selected Rooms
- trigger:
- platform: state
- entity_id: input_boolean.vacuum_startrooms
- to: 'on'
- action:
- ## Min ændring START
- - service: vacuum.send_command
- data_template:
- command: app_segment_clean
- entity_id: vacuum.shiny
- params: >-
- {% set do_kitchen = is_state('input_boolean.vacuum_kitchen', 'on') %}
- {% set do_bedroom = is_state('input_boolean.vacuum_bedroom', 'on') %}
- {% set do_living = is_state('input_boolean.vacuum_livingroom', 'on') %}
- {% set do_hallway = is_state('input_boolean.vacuum_hallway', 'on') %}
- {% set kitchen = "25," if do_kitchen else '' %}
- {% set bedroom = "17," if do_bedroom else '' %}
- {% set living = "21," if do_living else '' %}
- {% set hallway = "19," if do_hallway else '' %}
- [{{kitchen}}{{bedroom}}{{living}}{{hallway}}]
- ## Min ændring SLUT
- - data: {}
- entity_id: input_boolean.vacuum_startrooms
- service: input_boolean.turn_off
- - data: {}
- entity_id: input_boolean.vacuum_kitchen
- service: input_boolean.turn_off
- - data: {}
- entity_id: input_boolean.vacuum_bedroom
- service: input_boolean.turn_off
- - data: {}
- entity_id: input_boolean.vacuum_livingroom
- service: input_boolean.turn_off
- - data: {}
- entity_id: input_boolean.vacuum_hallway
- service: input_boolean.turn_off
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement