mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 09:17:06 +00:00
Update input_datetime.markdown (#13871)
sensor.time is in local time, not UTC. Most people will have an input_datetime for time only in their local time, not UTC. Hence converting the input_datetime to compare with sensor.time in local time *should not* do a timezone conversion.
This commit is contained in:
parent
662d924bf4
commit
8046b74c4c
@ -111,7 +111,7 @@ automation (note that you will need a
|
||||
automation:
|
||||
trigger:
|
||||
platform: template
|
||||
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.bedroom_alarm_clock_time', 'timestamp') | int | timestamp_custom('%H:%M', True)) }}"
|
||||
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.bedroom_alarm_clock_time', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
|
||||
action:
|
||||
service: light.turn_on
|
||||
entity_id: light.bedroom
|
||||
|
Loading…
x
Reference in New Issue
Block a user