Skip to content

Instantly share code, notes, and snippets.

@scottrhoyt
Created December 4, 2022 02:53
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 scottrhoyt/7bc0b312805f360001d0ed2f2a629e9d to your computer and use it in GitHub Desktop.
Save scottrhoyt/7bc0b312805f360001d0ed2f2a629e9d to your computer and use it in GitHub Desktop.
Home Assistant: Snooze automation
blueprint:
name: Snooze Button
description: Snooze an automation for a time using and input boolean
domain: automation
input:
snooze_button:
name: Snooze Button
description: The input boolean to use as the snooze button
selector:
entity:
domain: input_boolean
target_automation:
name: Target Automation
description: The automation to snooze
selector:
entity:
domain: automation
snooze_minutes:
name: Snooze Minutes
description: The time in minutes to snooze for
selector:
number:
min: 1
max: 1440
trigger:
- platform: state
entity_id:
- !input snooze_button
from: "off"
to: "on"
condition: []
action:
- service: automation.turn_off
data: {}
target:
entity_id: !input target_automation
- wait_for_trigger:
- platform: state
entity_id:
- !input snooze_button
from: "on"
to: "off"
timeout:
hours: 0
minutes: !input snooze_minutes
seconds: 0
milliseconds: 0
- service: automation.turn_on
data: {}
target:
entity_id: !input target_automation
- service: input_boolean.turn_off
data: {}
target:
entity_id: !input snooze_button
mode: restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment