Variable interval for my afternoon meds #174
This commit is contained in:
@ -571,7 +571,11 @@ script:
|
||||
target:
|
||||
entity_id: input_datetime.tony_afternoon_meds_notify
|
||||
data:
|
||||
time: "{{ (state_attr('input_datetime.master_bedroom_wakeup','timestamp') | int + 21600) | timestamp_custom('%H:%M', false)}}"
|
||||
time: >
|
||||
{% set interval = states('input_number.tony_afternoon_meds_interval') | int %}
|
||||
{% set math = ((interval * 60) * 60) | int %}
|
||||
{% set wakeup = state_attr('input_datetime.master_bedroom_wakeup','timestamp') | int %}
|
||||
{{ (wakeup + math) | timestamp_custom('%H:%M', false) }}
|
||||
- service: input_datetime.set_datetime
|
||||
target:
|
||||
entity_id: input_datetime.tina_morning_meds_notify
|
||||
|
Reference in New Issue
Block a user