Modernize templates

This commit is contained in:
2020-03-29 16:41:50 +03:00
parent 9a94eaf78f
commit a1d103923d
3 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
>-
{%- if is_state('binary_sensor.iss', 'on') -%}
Here is something interesting. The international space station is above us now. There are {{ states.binary_sensor.iss.attributes['number_of_people_in_space'] }} people in space right now.
Here is something interesting. The international space station is above us now. There are {{ state_attr('binary_sensor.iss','number_of_people_in_space') }} people in space right now.
{%- endif -%}
+1 -1
View File
@@ -1,6 +1,6 @@
>-
{%- if states.sensor.moon.state == 'Full moon' -%}
{%- if states('sensor.moon') == 'full_moon' -%}
{{
[
"Check out the full moon tonight!",