From afe404938955580f8f350df347502373a2ff66f8 Mon Sep 17 00:00:00 2001 From: ccostan Date: Mon, 8 Jan 2018 21:18:59 -0500 Subject: [PATCH] =?UTF-8?q?=1B[A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/speech_engine.yaml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/script/speech_engine.yaml b/script/speech_engine.yaml index 62bab740..fddbe0d7 100755 --- a/script/speech_engine.yaml +++ b/script/speech_engine.yaml @@ -147,12 +147,23 @@ 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 holiday() -%} {% if states.sensor.holiday.state != '' %} Today is {{ states.sensor.holiday.state }}. {% endif %} {%- endmacro -%} + {# ********************************************* #} {# ******** Start the Speech routines ******** #} {# ********************************************* #} @@ -215,9 +226,7 @@ speech_engine: {% endif %} {# call a Random fact about the house #} - {{ ([iss, moon]|random)() }} - - {{ holiday() }} + {{ ([iss, moon, uv, holiday]|random)() }} - service: input_boolean.turn_off data: