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 ] }}"