diff options
author | root <root@smartpi.suren.me> | 2023-01-10 07:45:02 +0400 |
---|---|---|
committer | root <root@smartpi.suren.me> | 2023-01-10 07:45:02 +0400 |
commit | 2c0c331eb7b7a03152309bbbd4e0fee157e8d86c (patch) | |
tree | 03391160212b39c4597ecc26010f2ba1235a65e3 /blueprints/script/lights | |
download | hass-2c0c331eb7b7a03152309bbbd4e0fee157e8d86c.tar.gz hass-2c0c331eb7b7a03152309bbbd4e0fee157e8d86c.tar.bz2 hass-2c0c331eb7b7a03152309bbbd4e0fee157e8d86c.tar.xz hass-2c0c331eb7b7a03152309bbbd4e0fee157e8d86c.zip |
Initial configuration
Diffstat (limited to 'blueprints/script/lights')
-rw-r--r-- | blueprints/script/lights/turn_off_lights.yaml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/blueprints/script/lights/turn_off_lights.yaml b/blueprints/script/lights/turn_off_lights.yaml new file mode 100644 index 0000000..e5538b7 --- /dev/null +++ b/blueprints/script/lights/turn_off_lights.yaml @@ -0,0 +1,32 @@ +blueprint: + name: turn_off_lights + description: Turns off a group of lights + domain: script + input: + lights: + name: Affected class of lights + description: "Which class of lights to turn off: all, bedroom, living, hall" + default: "all" + +variables: + name: !input lights + std: "switch.lights_{{ name }}" + manual: "switch.lights_{{ name }}_manual" + + +mode: single + +sequence: + - service: switch.turn_off + target: + entity_id: "{{ std, manual }}" + + - delay: + hours: 0 + minutes: 0 + seconds: 3 + milliseconds: 0 + + - service: switch.turn_on + target: + entity_id: "{{ [ manual ] }}" |