Skip to content

Instantly share code, notes, and snippets.

@Twanne
Last active December 20, 2023 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Twanne/29a9bbab1739fa1f2c6557c45f67cdc5 to your computer and use it in GitHub Desktop.
Save Twanne/29a9bbab1739fa1f2c6557c45f67cdc5 to your computer and use it in GitHub Desktop.
Home assistant script: light repeater
light_repeater:
alias: Light repeater
icon: mdi:lightbulb-auto-outline
description: Repeatedly turn on lights with a variable delay.
fields:
target_lights:
selector:
target:
entity:
domain: light
name: Target lights
description: Lights to repeatedly turn on
required: true
delay_timer:
selector:
duration:
enable_day: true
name: Delay_timer
description: The delay between every 'light.turn_on' command.
required: true
default: 00:01:00
brightness:
selector:
number:
min: 0
max: 100
step: 1
unit_of_measurement: '%'
name: Brightness
description: Brightness when turning the light on
required: true
sequence:
- repeat:
sequence:
- service: light.turn_on
data:
brightness_pct: '{{ brightness }}'
target: '{{ target_lights }}'
- delay: '{{ delay_timer }}'
until:
- condition: state
entity_id: script.light_repeater
state: 'off'
mode: parallel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment