mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-25 18:26:56 +00:00
fixed templates (#10298)
This commit is contained in:
parent
e4b8ecf212
commit
5829f348ec
@ -258,7 +258,7 @@ sensor:
|
|||||||
- platform: template
|
- platform: template
|
||||||
sensors:
|
sensors:
|
||||||
nonsmoker:
|
nonsmoker:
|
||||||
value_template: '{{ (( as_timestamp(now()) - as_timestamp(strptime("06.07.2018", "%d.%m.%Y")) ) / 86400 ) | round(2) }}'
|
value_template: "{{ (( as_timestamp(now()) - as_timestamp(strptime('06.07.2018', '%d.%m.%Y')) ) / 86400 ) | round(2) }}"
|
||||||
entity_id: sensor.date
|
entity_id: sensor.date
|
||||||
friendly_name: 'Not smoking'
|
friendly_name: 'Not smoking'
|
||||||
unit_of_measurement: "Days"
|
unit_of_measurement: "Days"
|
||||||
@ -275,7 +275,7 @@ sensor:
|
|||||||
- platform: template
|
- platform: template
|
||||||
sensors:
|
sensors:
|
||||||
nonsmoker:
|
nonsmoker:
|
||||||
value_template: '{{ (( as_timestamp(now()) - as_timestamp(strptime("06.07.2018", "%d.%m.%Y")) ) / 86400 ) | round(2) }}'
|
value_template: "{{ (( as_timestamp(now()) - as_timestamp(strptime('06.07.2018', '%d.%m.%Y')) ) / 86400 ) | round(2) }}"
|
||||||
entity_id: []
|
entity_id: []
|
||||||
friendly_name: 'Not smoking'
|
friendly_name: 'Not smoking'
|
||||||
unit_of_measurement: "Days"
|
unit_of_measurement: "Days"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user