From 4080b58a169761fb8c709d7912c203baa7529434 Mon Sep 17 00:00:00 2001 From: Mahasri Kalavala Date: Sat, 27 Apr 2019 16:11:34 -0400 Subject: [PATCH] minor updates --- templates/home_status.yaml | 6 ++-- zwcfg_0xd89c4f0c.xml | 62 +++++++++++++++++++------------------- 2 files changed, 35 insertions(+), 33 deletions(-) diff --git a/templates/home_status.yaml b/templates/home_status.yaml index 3b2684f..d189975 100644 --- a/templates/home_status.yaml +++ b/templates/home_status.yaml @@ -18,7 +18,8 @@ {%- macro tesla_status() -%} {% if states("sensor.tesla_model_3_5yj3e1ea8jf010610_range_sensor") != "unknown" %} - {%- if (states('sensor.tesla_model_3_5yj3e1ea8jf010610_range_sensor') | int) | round(0) < 75 -%} + {%- if (states('sensor.tesla_model_3_5yj3e1ea8jf010610_range_sensor') | int) | round(0) < 75 and + (states('sensor.tesla_model_3_5yj3e1ea8jf010610_range_sensor') | int) | round(0) > 0 -%} Attention!. Your Tesla car battery is at {{ states('sensor.tesla_model_3_5yj3e1ea8jf010610_battery_sensor') }} percent. and you can only drive about {{ (states('sensor.tesla_model_3_5yj3e1ea8jf010610_range_sensor') | int) | round(0) }} miles. Please charge your car if you want to go anywhere. {%- endif -%} {% endif %} @@ -148,7 +149,8 @@ {# Only notify pollen levels in spring #} {%- macro pollen_levels() -%} {% if states('sensor.season') | lower == "spring" %} - {% if states('sensor.pollen_level') | lower != "low" %} + {% if states('sensor.pollen_level') | lower != "low" and + states('sensor.pollen_level') | lower != "unknown" %} Pollen level is {{ states('sensor.pollen_level') }}. {% endif %} {% endif %} diff --git a/zwcfg_0xd89c4f0c.xml b/zwcfg_0xd89c4f0c.xml index 77751ba..6d1b4bd 100644 --- a/zwcfg_0xd89c4f0c.xml +++ b/zwcfg_0xd89c4f0c.xml @@ -35,7 +35,7 @@ - + @@ -216,8 +216,8 @@ - - + + @@ -379,7 +379,7 @@ - + @@ -490,7 +490,7 @@ - + @@ -601,7 +601,7 @@ - + @@ -728,9 +728,9 @@ - - - + + + @@ -1006,11 +1006,11 @@ - - - + + + - + @@ -1181,7 +1181,7 @@ - + @@ -1190,8 +1190,8 @@ - - + + @@ -1328,7 +1328,7 @@ - + @@ -1339,7 +1339,7 @@ - + @@ -1369,7 +1369,7 @@ - + @@ -1703,7 +1703,7 @@ - + @@ -1809,7 +1809,7 @@ - + @@ -2038,7 +2038,7 @@ - + @@ -2132,7 +2132,7 @@ - + @@ -2245,7 +2245,7 @@ - + @@ -2253,7 +2253,7 @@ - + @@ -2286,7 +2286,7 @@ - + @@ -2341,7 +2341,7 @@ - + @@ -2405,7 +2405,7 @@ - + @@ -2579,7 +2579,7 @@ - + @@ -2652,7 +2652,7 @@ - + @@ -2665,7 +2665,7 @@ - +