diff options
Diffstat (limited to 'blueprints/script/lights/turn_off_lights.yaml')
-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 ] }}" |