From 2c0c331eb7b7a03152309bbbd4e0fee157e8d86c Mon Sep 17 00:00:00 2001 From: root Date: Tue, 10 Jan 2023 07:45:02 +0400 Subject: Initial configuration --- blueprints/script/lights/turn_off_lights.yaml | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 blueprints/script/lights/turn_off_lights.yaml (limited to 'blueprints/script/lights') 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 ] }}" -- cgit v1.2.3