From b9eb70f7ac6ef609716d5df96375d50e61511872 Mon Sep 17 00:00:00 2001 From: ccostan Date: Tue, 28 Jul 2020 16:21:08 -0400 Subject: [PATCH] Added lightning alerts to the normal speech breifings. #392 --- config/templates/speech/briefing.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config/templates/speech/briefing.yaml b/config/templates/speech/briefing.yaml index 79b2095b..06f1d593 100755 --- a/config/templates/speech/briefing.yaml +++ b/config/templates/speech/briefing.yaml @@ -35,6 +35,10 @@ Outside, it is going to be {{ states('sensor.dark_sky_minutely_summary') }} {%- endmacro -%} + {%- macro lightning() -%} + There have been {{ states('sensor.blitzortung_lightning_counter') }} lightning strikes detected within {{(states('sensor.blitzortung_lightning_distance') | int / 1.69) | round (1, 'floor')}} Miles of our House. Please make sure everyone is inside the house. + {%- endmacro -%} + {%- macro light_check() -%} {% if states.group.all_lights.state != 'off' -%} There are @@ -284,6 +288,12 @@ {{ outside_weather() }} {% endif %} + {% if (states('sensor.blitzortung_lightning_counter')|int) > 0 %} + {{ lightning() }} + {% endif %} + + {{ states('sensor.blitzortung_lightning_counter') }} lightning strike(s) + {{ DoorOpened }} {{ DoorClosed }}