From b89dd559f0d8d9f5c70349e2439360581421c100 Mon Sep 17 00:00:00 2001 From: ccostan Date: Mon, 8 Jan 2018 21:21:53 -0500 Subject: [PATCH] Closes #279 - Added in UV Index to Speech. Warnings. --- script/speech_engine.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/script/speech_engine.yaml b/script/speech_engine.yaml index fddbe0d7..ddf17bd0 100755 --- a/script/speech_engine.yaml +++ b/script/speech_engine.yaml @@ -147,15 +147,15 @@ speech_engine: {%- endif -%} {%- endmacro -%} - # {%- macro uv() -%} - # {% if states.sensor.dark_sky_uv_index.state|int >= 6 and <= 7.9 %} - # Today's UV index is {{ states.sensor.dark_sky_uv_index.state }}. You should wear sunscreen if going outside. - # {% elif states.sensor.dark_sky_uv_index.state|int >= 8 and <=10.9 %} - # Today's UV index is {{ states.sensor.dark_sky_uv_index.state }}. This is VERY HIGH. Be sure wear sunscreen and re-apply. - # {% elif states.sensor.dark_sky_uv_index.state|int >= 11 - # Today's UV index is {{ states.sensor.dark_sky_uv_index.state }}. This is EXTREME. You should be very cautious going outside. - # {% endif %} - # {%- endmacro -%} + {%- macro uv() -%} + {% if states.sensor.dark_sky_uv_index.state|int >= 6 and states.sensor.dark_sky_uv_index.state|int <= 7.9 %} + Today's UV index is {{ states.sensor.dark_sky_uv_index.state }}. You should wear sunscreen if going outside. + {% elif states.sensor.dark_sky_uv_index.state|int >= 8 and states.sensor.dark_sky_uv_index.state|int <=10.9 %} + Today's UV index is {{ states.sensor.dark_sky_uv_index.state }}. This is VERY HIGH. Be sure wear sunscreen and re-apply. + {% elif states.sensor.dark_sky_uv_index.state|int >= 11 %} + Today's UV index is {{ states.sensor.dark_sky_uv_index.state }}. This is EXTREME. You should be very cautious going outside. + {% endif %} + {%- endmacro -%} {%- macro holiday() -%} {% if states.sensor.holiday.state != '' %}