Skip to content

Instantly share code, notes, and snippets.

@imnoor
Created December 21, 2024 14:21
Show Gist options
  • Save imnoor/33f19f6d83d2c6037d119a5bf38c4052 to your computer and use it in GitHub Desktop.
Save imnoor/33f19f6d83d2c6037d119a5bf38c4052 to your computer and use it in GitHub Desktop.
alias: Set Timer
description: Set a custom timer
triggers:
- trigger: conversation
command:
- book a timer for {minute} minute[s]
- book a timer for {second} second[s]
- book a timer for {hour} hours[s]
- book a timer for {hour} hours[s] and {minute} minute[s]
- book a timer for {minute} minute[s] and {second} second[s]
conditions: []
actions:
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.alarm_play
- action: timer.start
metadata: {}
data:
duration: |
{% set t_hour = trigger.slots.hour | default(0) | int %}
{% set t_sec = trigger.slots.second | default(0) | int %}
{% set t_min = trigger.slots.minute | default(0) | int %}
{{t_hour}}:{{t_min}}:{{t_sec}}
target:
entity_id: timer.variable_timer
mode: single
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment