diff --git a/source/_integrations/template.markdown b/source/_integrations/template.markdown index 5781e761fc7..cd018e79119 100644 --- a/source/_integrations/template.markdown +++ b/source/_integrations/template.markdown @@ -61,7 +61,7 @@ template: {% set bedroom = states('sensor.bedroom_temperature') | float %} {% set kitchen = states('sensor.kitchen_temperature') | float %} - {{ ((bedroom + kitchen) / 2) | round(1) }} + {{ ((bedroom + kitchen) / 2) | round(1, default=0) }} ``` {% endraw %} @@ -86,8 +86,8 @@ template: minutes: 0 sensor: # Keep track how many days have past since a date - - name: Not smoking - state: '{{ ( ( as_timestamp(now()) - as_timestamp(strptime("06.07.2018", "%d.%m.%Y")) ) / 86400 ) | round }}' + - name: "Not smoking" + state: '{{ ( ( as_timestamp(now()) - as_timestamp(strptime("06.07.2018", "%d.%m.%Y")) ) / 86400 ) | round(default=0) }}' unit_of_measurement: "Days" ```