From 7c83a2059f7f3540c77f9764d357a9361058bf7e Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Tue, 20 Mar 2018 15:54:15 -0400 Subject: [PATCH] Weather alerts for the win --- scripts/chromecast_media_stop.yaml | 2 +- sensors/weather.yaml | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/chromecast_media_stop.yaml b/scripts/chromecast_media_stop.yaml index e1775ce..31209ca 100644 --- a/scripts/chromecast_media_stop.yaml +++ b/scripts/chromecast_media_stop.yaml @@ -1,6 +1,6 @@ chromecast_media_stop: sequence: - - service: media_player.stop_media + - service: media_player.media_stop data: entity_id: media_player.living_room_tv \ No newline at end of file diff --git a/sensors/weather.yaml b/sensors/weather.yaml index 440a28a..7bca295 100644 --- a/sensors/weather.yaml +++ b/sensors/weather.yaml @@ -79,9 +79,9 @@ tornado_warning: friendly_name: 'Tornado Warning' value_template: >- - {%- if is_state("states.sensor.pws_alerts.attributes.Description", "Tornado Warning") %} + {%- if states.sensor.pws_alerts.attributes.Description == "Tornado Warning" %} active - {% elif is_state("states.sensor.pws_alerts.attributes.Description_TOR", "Tornado Warning") %} + {% elif states.sensor.pws_alerts.attributes.Description_TOR == "Tornado Warning" %} active {% else %} inactive @@ -91,9 +91,9 @@ tornado_watch: friendly_name: 'Tornado Watch' value_template: >- - {%- if is_state("states.sensor.pws_alerts.attributes.Description", "Tornado Watch") %} + {%- if states.sensor.pws_alerts.attributes.Description == "Tornado Watch" %} active - {% elif is_state("states.sensor.pws_alerts.attributes.Description_TOW", "Tornado Watch") %} + {% elif states.sensor.pws_alerts.attributes.Description_TOW == "Tornado Watch" %} active {% else %} inactive @@ -105,7 +105,7 @@ value_template: >- {%- if states.sensor.pws_alerts.attributes.Description == "Severe Thunderstorm Warning" %} active - {% elif is_state("states.sensor.pws_alerts.attributes.Description_WRN", "Severe Thunderstorm Warning") %} + {% elif states.sensor.pws_alerts.attributes.Description_WRN == "Severe Thunderstorm Warning" %} active {% else %} inactive @@ -115,9 +115,9 @@ storm_statement: friendly_name: 'Storm Statement' value_template: >- - {%- if states.sensor.pws_alerts.attributes.Description == "Wind Advisory" %} + {%- if states.sensor.pws_alerts.attributes.Description == "Severe Weather Statement" %} active - {% elif is_state("states.sensor.pws_alerts.attributes.Description_SVR", "Severe Weather Statement") %} + {% elif states.sensor.pws_alerts.attributes.Description_SVR == "Severe Weather Statement" %} active {% else %} inactive