Created
October 2, 2019 18:53
-
-
Save oischinger/7483bc937dc36765a747a4c3cea42a40 to your computer and use it in GitHub Desktop.
Vacuum zones script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
script: | |
vacuum_zones_erdgeschoss: | |
alias: "Erdgeschoss Zonen saugen" | |
sequence: | |
- service: vacuum.send_command | |
data_template: | |
entity_id: 'vacuum.rockrobo' | |
command: 'zoned_cleanup' | |
params: | |
'zone_ids': | |
- "{%- if states('input_boolean.flur_vacuum_zone') == 'on' %}flur{% endif %}" | |
- "{%- if states('input_boolean.kueche_vacuum_zone') == 'on' %}kueche{% endif %}" | |
- "{%- if states('input_boolean.essbereich_vacuum_zone') == 'on' %}essbereich{% endif %}" | |
- "{%- if states('input_boolean.sofa_vacuum_zone') == 'on' %}sofa{% endif %}" | |
- "{%- if states('input_boolean.wohnzimmerwand_vacuum_zone') == 'on' %}wohnzimmerwand{% endif %}" | |
- "{%- if states('input_boolean.wintergarten_vacuum_zone') == 'on' %}wintergarten{% endif %}" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Finally it works, thanks for support!
I was helped here too. https://community.home-assistant.io/t/data-templates-input-boolean-in-scripts-i-cant-solve-this/142568/6
You are advised to replace
states('input_boolean.floor1camera_vacuum_zone') == 'on'
with:
is_state('input_boolean.floor1camera_vacuum_zone', 'on')