-
-
Save oischinger/7483bc937dc36765a747a4c3cea42a40 to your computer and use it in GitHub Desktop.
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 %}" | |
Sorry if I'm boring you. I use the raw unit editor, where and how should I insert the script? I tried in the map card but it still doesn't work. Could you send me your configuration as example?
No worries. My lovelace card is a vertical stack card in a card composed from an entities card (which only has a single script entity) and the picture-elements card which you already have.
So just add an independent entities card like this:
type: entities
entities:
- entity: script.vacuum_zone_pulizia
name: Zoned cleanup
I suggest to read this https://www.home-assistant.io/lovelace/vertical-stack/ if you then want to combine those two cards in one.
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')
I added the script to my lovelace ui as an entity and just trigger it from there manually. There is no automatic start when the input_booleans change state or similar