Skip to content

Instantly share code, notes, and snippets.

@Bluscream
Last active January 15, 2024 20:35
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 Bluscream/9329f060fca2cab9535672f837d02139 to your computer and use it in GitHub Desktop.
Save Bluscream/9329f060fca2cab9535672f837d02139 to your computer and use it in GitHub Desktop.
HomeAssistant blueprints
blueprint:
name: Toggle Targets
description: A script that toggles selected targets with a delay.
domain: script
input:
targets:
name: Targets
description: The devices to toggle.
selector:
entity: {}
speed:
name: Speed
description: The delay between toggles.
selector:
entity:
domain: input_number
switch:
name: Switch
description: The on/off switch.
selector:
boolean: {}
sequence:
- repeat:
while:
- '{{states(!input switch) == "on"}}'
sequence:
- service: switch.toggle
target:
entity_id: '{{ !input targets }}'
- delay: '{{ states(!input speed) | float }}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment