1
0

Fix alarm-clock automation

This commit is contained in:
Przemek Grondek 2021-01-11 03:11:14 +01:00
parent dc097c7d1f
commit 627552f3ae

View File

@ -1,5 +1,5 @@
- id: alarm-automation
alias: [Alarm] Wakeup automation
alias: '[Alarm] Wakeup automation'
description: ''
trigger:
- platform: time
@ -43,7 +43,7 @@
random_song: true
mode: single
- id: alarm-update-time
alias: [Alarm] Update alarm time
alias: '[Alarm] Update alarm time'
mode: single
trigger:
- platform: state
@ -56,6 +56,6 @@
state: unknown
action:
- service: input_datetime.set_datetime
entity_id: input_datetime.alarm
data:
datetime: "{{ (((state_attr('sensor.sm_g965f_next_alarm', 'Time in Milliseconds') | int / 1000) - 30*60 ) | timestamp_custom('%Y-%m-%d %H:%M:%S')) }}"
entity_id: input_datetime.alarm
data:
datetime: "{{ (((state_attr('sensor.sm_g965f_next_alarm', 'Time in Milliseconds') | int / 1000) - 30*60 ) | timestamp_custom('%Y-%m-%d %H:%M:%S')) }}"