Some weather-related changes to briefing scripts
This commit is contained in:
@ -627,7 +627,7 @@ sensor:
|
|||||||
{%- if states('sensor.todays_high_temp')|int > 63 %}
|
{%- if states('sensor.todays_high_temp')|int > 63 %}
|
||||||
{%- if states('sensor.todays_high_temp')|int < 80 %}
|
{%- if states('sensor.todays_high_temp')|int < 80 %}
|
||||||
Nice
|
Nice
|
||||||
{% elif states('sensor.todays_high_temp')|int > 95 %}
|
{% elif states('sensor.todays_high_temp')|int > 90 %}
|
||||||
Hot
|
Hot
|
||||||
{% else %}
|
{% else %}
|
||||||
Toasty
|
Toasty
|
||||||
@ -664,6 +664,29 @@ sensor:
|
|||||||
'downright tolerable outside. ',
|
'downright tolerable outside. ',
|
||||||
] | random }}
|
] | random }}
|
||||||
So I suggest wearing shorts.
|
So I suggest wearing shorts.
|
||||||
|
{% elif is_state('sensor.clothing_forecast', 'Toasty') and is_state('sensor.current_forecast', 'sunny') %}
|
||||||
|
It is going to be
|
||||||
|
{{ [ 'on the warm side ',
|
||||||
|
' rather warm outside ',
|
||||||
|
' almost too hot outside ',
|
||||||
|
' a little warm ',
|
||||||
|
] | random }}
|
||||||
|
today, and very sunny. So I suggest wearing shorts and
|
||||||
|
{{ [ 'bringing your shades, hat, and maybe some sunscreen.',
|
||||||
|
'preparing to bake under the sun.',
|
||||||
|
'getting ready to be cooked alive.',
|
||||||
|
] | random }}
|
||||||
|
{% elif is_state('sensor.clothing_forecast', 'Hot') and is_state('sensor.current_forecast', 'sunny') %}
|
||||||
|
It is going to be
|
||||||
|
{{ [ 'so hot you\'ll sweat your balls off',
|
||||||
|
'hotter than the sun ',
|
||||||
|
'hotter than the inside of a volcano ',
|
||||||
|
] | random }}
|
||||||
|
today, and very sunny. So I suggest wearing shorts and
|
||||||
|
{{ [ 'bringing your shades, hat, and maybe some sunscreen.',
|
||||||
|
'preparing to bake under the sun.',
|
||||||
|
'getting ready to be cooked alive.',
|
||||||
|
] | random }}
|
||||||
{% elif is_state('sensor.clothing_forecast', 'Toasty') %}
|
{% elif is_state('sensor.clothing_forecast', 'Toasty') %}
|
||||||
It is going to be
|
It is going to be
|
||||||
{{ [ 'on the warm side ',
|
{{ [ 'on the warm side ',
|
||||||
@ -677,11 +700,16 @@ sensor:
|
|||||||
{{ [ 'so hot you\'ll sweat your balls off',
|
{{ [ 'so hot you\'ll sweat your balls off',
|
||||||
'hotter than the sun ',
|
'hotter than the sun ',
|
||||||
'hotter than the inside of a volcano ',
|
'hotter than the inside of a volcano ',
|
||||||
|
'hotter than hell itself ',
|
||||||
] | random }}
|
] | random }}
|
||||||
today. So I suggest wearing shorts.
|
today. So I suggest wearing shorts.
|
||||||
{% else %}
|
{% else %}
|
||||||
It is going to be {{ states.sensor.clothing_forecast.state }} today so I suggest wearing shorts.
|
It is going to be {{ states.sensor.clothing_forecast.state }} today so I suggest wearing shorts.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% set high = state_attr('sensor.current_forecast','high_temp') %}
|
||||||
|
{% if high > 85 %}
|
||||||
|
Warning, today will be a very sweaty day, so please remember to stay hydrated!
|
||||||
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
Based on the current temperature,
|
Based on the current temperature,
|
||||||
{% if is_state('sensor.clothing_forecast', 'Freezing') %}
|
{% if is_state('sensor.clothing_forecast', 'Freezing') %}
|
||||||
@ -699,11 +727,34 @@ sensor:
|
|||||||
'downright tolerable outside. ',
|
'downright tolerable outside. ',
|
||||||
] | random }}
|
] | random }}
|
||||||
So I suggest wearing shorts.
|
So I suggest wearing shorts.
|
||||||
|
{% elif is_state('sensor.clothing_forecast', 'Toasty') and is_state('weather.iron_nerd_weather_station','sunny') %}
|
||||||
|
It is
|
||||||
|
{{ [ 'on the warm side ',
|
||||||
|
' rather warm ',
|
||||||
|
' almost too hot ',
|
||||||
|
' a little warm ',
|
||||||
|
] | random }}
|
||||||
|
and very sunny outside. So I suggest wearing shorts and
|
||||||
|
{{ [ 'bringing your shades, hat, and maybe some sunscreen.',
|
||||||
|
'preparing to bake under the sun.',
|
||||||
|
'getting ready to be cooked alive.',
|
||||||
|
] | random }}
|
||||||
|
{% elif is_state('sensor.clothing_forecast', 'Hot') and is_state('weather.iron_nerd_weather_station','sunny') %}
|
||||||
|
It is
|
||||||
|
{{ [ 'so hot you\'ll sweat your balls off',
|
||||||
|
'hotter than the sun ',
|
||||||
|
'hotter than the inside of a volcano ',
|
||||||
|
] | random }}
|
||||||
|
and very sunny outside. So I suggest wearing shorts and
|
||||||
|
{{ [ 'bringing your shades, hat, and maybe some sunscreen.',
|
||||||
|
'preparing to bake under the sun.',
|
||||||
|
'getting ready to be cooked alive.',
|
||||||
|
] | random }}
|
||||||
{% elif is_state('sensor.clothing_forecast', 'Toasty') %}
|
{% elif is_state('sensor.clothing_forecast', 'Toasty') %}
|
||||||
It is
|
It is
|
||||||
{{ [ 'on the warm side ',
|
{{ [ 'on the warm side ',
|
||||||
' rather warm outside ',
|
' rather warm ',
|
||||||
' almost too hot outside ',
|
' almost too hot ',
|
||||||
' a little warm ',
|
' a little warm ',
|
||||||
] | random }}
|
] | random }}
|
||||||
outside. So I suggest wearing shorts.
|
outside. So I suggest wearing shorts.
|
||||||
@ -712,11 +763,16 @@ sensor:
|
|||||||
{{ [ 'so hot you\'ll sweat your balls off',
|
{{ [ 'so hot you\'ll sweat your balls off',
|
||||||
'hotter than the sun ',
|
'hotter than the sun ',
|
||||||
'hotter than the inside of a volcano ',
|
'hotter than the inside of a volcano ',
|
||||||
|
'hotter than hell itself ',
|
||||||
] | random }}
|
] | random }}
|
||||||
outside. So I suggest wearing shorts.
|
outside. So I suggest wearing shorts.
|
||||||
{% else %}
|
{% else %}
|
||||||
It is {{ states.sensor.clothing_forecast.state }} right now so I suggest wearing shorts.
|
It is {{ states.sensor.clothing_forecast.state }} right now so I suggest wearing shorts.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% set heatindex = states('sensor.pirateweather_apparent_temperature') | float | round %}
|
||||||
|
{% if heatindex > 90 %}
|
||||||
|
Warning, the heat index is {{ heatindex }} degrees right now, which is very high. So please make sure to stay hydrated!
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
|
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
'If you have not gotten dressed it is that time.',
|
'If you have not gotten dressed it is that time.',
|
||||||
'It is time to get your butt in gear. And your face too, ideally.',
|
'It is time to get your butt in gear. And your face too, ideally.',
|
||||||
'It is time to do the getting of readiness. And be nice to your mother!',
|
'It is time to do the getting of readiness. And be nice to your mother!',
|
||||||
'In the words of the legendary Tom Brady, LETS GO!!!'
|
'In the words of the legendary Tom Brady, LETS GO!!!',
|
||||||
] | random }}
|
] | random }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
@ -32,6 +32,21 @@
|
|||||||
'rather enjoyable outside. ',
|
'rather enjoyable outside. ',
|
||||||
] | random }}
|
] | random }}
|
||||||
So I suggest wearing shorts.
|
So I suggest wearing shorts.
|
||||||
|
{% elif is_state('sensor.clothing_forecast', 'Toasty') and is_state('sensor.current_forecast','sunny') %}
|
||||||
|
It is going to be
|
||||||
|
{{ [ ' rather warm outside. ',
|
||||||
|
' almost too hot outside. ',
|
||||||
|
' a little warm today. ',
|
||||||
|
] | random }}
|
||||||
|
and very sunny, so I suggest wearing shorts and maybe some sunscreen.
|
||||||
|
{% elif is_state('sensor.clothing_forecast', 'Hot') and is_state('sensor.current_forecast','sunny') %}
|
||||||
|
It is going to be
|
||||||
|
{{ [ 'hotter than the sun today. ',
|
||||||
|
'hotter than the sun outside. ',
|
||||||
|
'super hot today. ',
|
||||||
|
'hotter than the inside of a volcano today. Well not exactly, but you get the point. '
|
||||||
|
] | random }}
|
||||||
|
and very sunny, so I suggest wearing shorts and maybe some sunscreen.
|
||||||
{% elif is_state('sensor.clothing_forecast', 'Toasty') %}
|
{% elif is_state('sensor.clothing_forecast', 'Toasty') %}
|
||||||
It is going to be
|
It is going to be
|
||||||
{{ [ ' rather warm outside. ',
|
{{ [ ' rather warm outside. ',
|
||||||
@ -50,6 +65,10 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
It is going to be {{ states.sensor.clothing_forecast.state }} today so I suggest wearing shorts.
|
It is going to be {{ states.sensor.clothing_forecast.state }} today so I suggest wearing shorts.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% set hightemp = state_attr('sensor.current_forecast','high_temp') | float %}
|
||||||
|
{% if hightemp > 85 %}
|
||||||
|
Warning, today will be a very sweaty day, so you need to remember to stay hydrated.
|
||||||
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@ -58,7 +77,7 @@
|
|||||||
Today is the first day of school!
|
Today is the first day of school!
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ [ 'Today is a school day.',
|
{{ [ 'Today is a school day.',
|
||||||
'It is a school day. '
|
'It is a school day. ',
|
||||||
] | random }}
|
] | random }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<s>Pickup today will be at {{(state_attr('input_datetime.school_day_end', 'timestamp') | int | timestamp_custom('%I:%M %p', False)) }}</s>
|
<s>Pickup today will be at {{(state_attr('input_datetime.school_day_end', 'timestamp') | int | timestamp_custom('%I:%M %p', False)) }}</s>
|
||||||
@ -73,9 +92,9 @@
|
|||||||
And look at that. You do not have school today.
|
And look at that. You do not have school today.
|
||||||
{{ [ 'Guess today would be a good day to clean your room.',
|
{{ [ 'Guess today would be a good day to clean your room.',
|
||||||
'You could always do some chores. HA, good one.',
|
'You could always do some chores. HA, good one.',
|
||||||
'Want to play a nice game of chess? Sorry. I meant, want to play Dark Souls?',
|
'Want to play a nice game of chess? Sorry. I meant, want to play Beam NG?',
|
||||||
'I hope you enjoy your day off. You deserve it.',
|
'I hope you enjoy your day off. You deserve it.',
|
||||||
'Today would be a good day to spend some time with mom and dad.'
|
'Today would be a good day to spend some time with mom and dad.',
|
||||||
] | random }}
|
] | random }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user