Skip to content

Instantly share code, notes, and snippets.

@anjiro
Created October 17, 2022 17:45
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 anjiro/3bd8109c094bb4c628cd29983a35a550 to your computer and use it in GitHub Desktop.
Save anjiro/3bd8109c094bb4c628cd29983a35a550 to your computer and use it in GitHub Desktop.
Test
blueprint:
name: One-Time Scheduled Toggle
description: Turn something on or off at a scheduled time.
domain: automation
input:
what:
name: Action to do
description: On or off?
selector:
boolean:
which:
name: Entity to control
description: Which entity?
selector:
target:
entity:
domain:
- light
- switch
- input_boolean
- climate
when:
name: When to do it
description: When should the action occur?
selector:
time:
variables:
command: !input what
trigger:
- platform: time
at: !input when
condition: []
action:
- service: "homeassistant.turn_{{ iif(command, 'on', 'off') }}"
target: !input which
- service: automation.turn_off
target:
entity_id: '{{ this.entity_id }}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment