Skip to content

Instantly share code, notes, and snippets.

@jlpouffier
Created August 6, 2023 18:29
Show Gist options
  • Save jlpouffier/7cc9b0d71c82983c368c2e7e3a85f465 to your computer and use it in GitHub Desktop.
Save jlpouffier/7cc9b0d71c82983c368c2e7e3a85f465 to your computer and use it in GitHub Desktop.
Home Assistant Hot Tip of the Day: Run vs Turn on Script
turn_on_kitchen_lights_and_wait_3_seconds:
alias: Turn on Kitchen Lights and Wait 3 seconds
sequence:
- service: light.turn_on
data: {}
target:
entity_id: light.kitchen_lights
- delay:
hours: 0
minutes: 0
seconds: 3
milliseconds: 0
mode: single
turn_on_office_lights_and_wait_3_seconds:
alias: 'Turn on Office Lights and Wait 3 seconds '
sequence:
- service: light.turn_on
data: {}
target:
entity_id: light.office_rgbw_lights
- delay:
hours: 0
minutes: 0
seconds: 3
milliseconds: 0
mode: single
run_both_scripts:
alias: Run Kitchen Script + Run Office Script
sequence:
- service: script.turn_on_kitchen_lights_and_wait_3_seconds
data: {}
- service: script.turn_on_office_lights_and_wait_3_seconds
data: {}
mode: single
turn_on_both_scripts:
alias: Turn On Kitchen Script + Turn On Office Script
sequence:
- service: script.turn_on
data: {}
target:
entity_id: script.turn_on_kitchen_lights_and_wait_3_seconds
- service: script.turn_on
data: {}
target:
entity_id: script.turn_on_office_lights_and_wait_3_seconds
mode: single
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment