Fix alarm-clock automation
This commit is contained in:
parent
dc097c7d1f
commit
627552f3ae
@ -1,5 +1,5 @@
|
|||||||
- id: alarm-automation
|
- id: alarm-automation
|
||||||
alias: [Alarm] Wakeup automation
|
alias: '[Alarm] Wakeup automation'
|
||||||
description: ''
|
description: ''
|
||||||
trigger:
|
trigger:
|
||||||
- platform: time
|
- platform: time
|
||||||
@ -43,7 +43,7 @@
|
|||||||
random_song: true
|
random_song: true
|
||||||
mode: single
|
mode: single
|
||||||
- id: alarm-update-time
|
- id: alarm-update-time
|
||||||
alias: [Alarm] Update alarm time
|
alias: '[Alarm] Update alarm time'
|
||||||
mode: single
|
mode: single
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
@ -56,6 +56,6 @@
|
|||||||
state: unknown
|
state: unknown
|
||||||
action:
|
action:
|
||||||
- service: input_datetime.set_datetime
|
- service: input_datetime.set_datetime
|
||||||
entity_id: input_datetime.alarm
|
entity_id: input_datetime.alarm
|
||||||
data:
|
data:
|
||||||
datetime: "{{ (((state_attr('sensor.sm_g965f_next_alarm', 'Time in Milliseconds') | int / 1000) - 30*60 ) | timestamp_custom('%Y-%m-%d %H:%M:%S')) }}"
|
datetime: "{{ (((state_attr('sensor.sm_g965f_next_alarm', 'Time in Milliseconds') | int / 1000) - 30*60 ) | timestamp_custom('%Y-%m-%d %H:%M:%S')) }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user