Add lightning alerts to all briefings
This commit is contained in:
@ -33,7 +33,17 @@
|
||||
|
||||
<p>
|
||||
{{ states('sensor.current_conditions_detail') }}
|
||||
|
||||
{% if is_state('input_boolean.lightning_warning','on') %}
|
||||
{% set ltgdist = (states('sensor.blitzortung_lightning_distance') | int) / 1.609 | round %}
|
||||
{{ [
|
||||
"There are reports of lightning in the area, please stay safe. ",
|
||||
"My sensors detect the presence of lightning nearby, so you should prepare to take shelter if needed. ",
|
||||
"A little birdy told me there is lightning nearby. His feathers were all sticking up, I have no idea why. ",
|
||||
"Please exercise caution, as there is lightning in the area. ",
|
||||
"That flashing in the sky is not interstellar warfare, it is simply lightning. But you should still be careful outside. ",
|
||||
] | random }}
|
||||
"The nearest lightning strike is {{ ltgdist }} miles away. "
|
||||
{% endif %}
|
||||
{% if states('sensor.weatheralerts_active_alerts') > '0' %}
|
||||
"Currently there are weather alerts active. The total number of alerts is {{ states('sensor.weatheralerts_active_alerts') }}. They are as follows. "
|
||||
{% if is_state('sensor.weatheralerts_alert_1','on') %}
|
||||
|
@ -21,7 +21,19 @@
|
||||
] | random }}
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{% if is_state('input_boolean.lightning_warning','on') %}
|
||||
{% set ltgdist = (states('sensor.blitzortung_lightning_distance') | int) / 1.609 | round %}
|
||||
{{ [
|
||||
"There are reports of lightning in the area, please stay safe. ",
|
||||
"My sensors detect the presence of lightning nearby, so you should prepare to take shelter if needed. ",
|
||||
"A little birdy told me there is lightning nearby. His feathers were all sticking up, I have no idea why. ",
|
||||
"Please exercise caution, as there is lightning in the area. ",
|
||||
"That flashing in the sky is not interstellar warfare, it is simply lightning. But you should still be careful outside. ",
|
||||
] | random }}
|
||||
"The nearest lightning strike is {{ ltgdist }} miles away. "
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
Today the high temperature will be {{ state_attr('sensor.current_forecast','high_temp') }} degrees.
|
||||
{{ states('sensor.clothing_forecast_detail') }}
|
||||
|
@ -100,6 +100,17 @@
|
||||
'Do not forget to take your melatonin.'
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{% if is_state('input_boolean.lightning_warning','on') %}
|
||||
{% set ltgdist = (states('sensor.blitzortung_lightning_distance') | int) / 1.609 | round %}
|
||||
{{ [
|
||||
"Please ignore that strobing effect in your window. That is mother nature trying to distract you from sleeping. Do not give in! ",
|
||||
"There is lightning outside, but you are safe because you are inside. Anti lightning turrets have already been deployed. ",
|
||||
"Do not let the lightning outside keep you awake. The thunder will do a good enough job of that. ",
|
||||
] | random }}
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Just for you, here is a random dad joke <break time="1s"/> {{ states('sensor.random_joke') }}
|
||||
</p>
|
||||
|
@ -52,6 +52,19 @@
|
||||
<p>
|
||||
It is currently {{states.weather.iron_nerd_weather_station.state}} and {{states.sensor.pirateweather_temperature.state|round}} degrees in Defiance.
|
||||
</p>
|
||||
<p>
|
||||
{% if is_state('input_boolean.lightning_warning','on') %}
|
||||
{% set ltgdist = (states('sensor.blitzortung_lightning_distance') | int) / 1.609 | round %}
|
||||
{{ [
|
||||
"There are reports of lightning in the area, please stay safe. ",
|
||||
"My sensors detect the presence of lightning nearby, so you should prepare to take shelter if needed. ",
|
||||
"A little birdy told me there is lightning nearby. His feathers were all sticking up, I have no idea why. ",
|
||||
"Please exercise caution, as there is lightning in the area. ",
|
||||
"That flashing in the sky is not interstellar warfare, it is simply lightning. But you should still be careful outside. ",
|
||||
] | random }}
|
||||
"The nearest lightning strike is {{ ltgdist }} miles away. "
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
{% if states('sensor.weatheralerts_active_alerts') > '0' %}
|
||||
"Currently there are weather alerts active. The total number of alerts is {{ states('sensor.weatheralerts_active_alerts') }}. They are as follows. "
|
||||
|
@ -10,7 +10,19 @@
|
||||
"My programmer decided that I should say something interesting here, and then he realized that he is not interesting. ",
|
||||
] | random }}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{% if is_state('input_boolean.lightning_warning','on') %}
|
||||
{% set ltgdist = (states('sensor.blitzortung_lightning_distance') | int) / 1.609 | round %}
|
||||
{{ [
|
||||
"There are reports of lightning in the area, please stay safe. ",
|
||||
"My sensors detect the presence of lightning nearby, so you should prepare to take shelter if needed. ",
|
||||
"A little birdy told me there is lightning nearby. His feathers were all sticking up, I have no idea why. ",
|
||||
"Please exercise caution, as there is lightning in the area. ",
|
||||
"That flashing in the sky is not interstellar warfare, it is simply lightning. But you should still be careful outside. ",
|
||||
] | random }}
|
||||
"The nearest lightning strike is {{ ltgdist }} miles away. "
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
{% if is_state('input_boolean.tony_streaming_today','on') %}
|
||||
{{ [
|
||||
|
@ -2,6 +2,20 @@
|
||||
{# Weather Briefing #}
|
||||
{%- macro getReport() -%}
|
||||
|
||||
<p>
|
||||
{% if is_state('input_boolean.lightning_warning','on') %}
|
||||
{% set ltgdist = (states('sensor.blitzortung_lightning_distance') | int) / 1.609 | round %}
|
||||
{{ [
|
||||
"There are reports of lightning in the area, please stay safe. ",
|
||||
"My sensors detect the presence of lightning nearby, so you should prepare to take shelter if needed. ",
|
||||
"A little birdy told me there is lightning nearby. His feathers were all sticking up, I have no idea why. ",
|
||||
"Please exercise caution, as there is lightning in the area. ",
|
||||
"That flashing in the sky is not interstellar warfare, it is simply lightning. But you should still be careful outside. ",
|
||||
] | random }}
|
||||
"The nearest lightning strike is {{ ltgdist }} miles away. "
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{{ states('sensor.current_conditions_detail') }}
|
||||
</p>
|
||||
|
@ -60,7 +60,19 @@
|
||||
Happy Birthday Emmalynn!
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{% if is_state('input_boolean.lightning_warning','on') %}
|
||||
{% set ltgdist = (states('sensor.blitzortung_lightning_distance') | int) / 1.609 | round %}
|
||||
{{ [
|
||||
"There are reports of lightning in the area, please stay safe. ",
|
||||
"My sensors detect the presence of lightning nearby, so you should prepare to take shelter if needed. ",
|
||||
"A little birdy told me there is lightning nearby. His feathers were all sticking up, I have no idea why. ",
|
||||
"Please exercise caution, as there is lightning in the area. ",
|
||||
"That flashing in the sky is not interstellar warfare, it is simply lightning. But you should still be careful outside. ",
|
||||
] | random }}
|
||||
"The nearest lightning strike is {{ ltgdist }} miles away. "
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
{% if states('sensor.weatheralerts_active_alerts') > '0' %}
|
||||
"Currently there are weather alerts active. The total number of alerts is {{ states('sensor.weatheralerts_active_alerts') }}. They are as follows. "
|
||||
|
Reference in New Issue
Block a user