mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-27 19:26:50 +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:
|
display_options:
|
||||||
- 'date_time_iso'
|
- 'date_time_iso'
|
||||||
# Build on the standard sensor to produce one that can be customized
|
# Build on the standard sensor to produce one that can be customized
|
||||||
- platform: template
|
template:
|
||||||
sensors:
|
- sensor:
|
||||||
time_formatted:
|
- name: "Date and time"
|
||||||
friendly_name: "Date and time"
|
state: "{{ as_timestamp(states('sensor.date_time_iso')) | timestamp_custom('%A %B %-d, %I:%M %p') }}"
|
||||||
value_template: "{{ as_timestamp(states('sensor.date_time_iso')) | timestamp_custom('%A %B %-d, %I:%M %p') }}"
|
icon: "mdi:calendar-clock"
|
||||||
icon_template: mdi:calendar-clock
|
|
||||||
```
|
```
|
||||||
|
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user