mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
time_date update template sensor example (#20021)
This commit is contained in:
parent
0cfc528a5b
commit
5856c967e8
@ -62,12 +62,11 @@ sensor:
|
||||
display_options:
|
||||
- 'date_time_iso'
|
||||
# Build on the standard sensor to produce one that can be customized
|
||||
- platform: template
|
||||
sensors:
|
||||
time_formatted:
|
||||
friendly_name: "Date and time"
|
||||
value_template: "{{ as_timestamp(states('sensor.date_time_iso')) | timestamp_custom('%A %B %-d, %I:%M %p') }}"
|
||||
icon_template: mdi:calendar-clock
|
||||
template:
|
||||
- sensor:
|
||||
- name: "Date and time"
|
||||
state: "{{ as_timestamp(states('sensor.date_time_iso')) | timestamp_custom('%A %B %-d, %I:%M %p') }}"
|
||||
icon: "mdi:calendar-clock"
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user