Overhaul presentation of general weather information
This commit is contained in:
@ -22,38 +22,7 @@
|
||||
{% endif %}
|
||||
|
||||
<p>
|
||||
The weather in Defiance is {{ state_attr('weather.iron_nerd_weather_station','temperature') | round }} degrees
|
||||
{% if is_state('weather.iron_nerd_weather_station','rainy') %}
|
||||
{{ [
|
||||
'with rain.',
|
||||
'with showers.'
|
||||
] | random }}
|
||||
{% elif is_state('weather.iron_nerd_weather_station','cloudy') %}
|
||||
{{ [
|
||||
'with clouds.',
|
||||
'with cloudy skies.'
|
||||
] | random }}
|
||||
{% elif is_state('weather.iron_nerd_weather_station','partlycloudy') %}
|
||||
{{ [
|
||||
'with some clouds.',
|
||||
'with partly cloudy skies.',
|
||||
'with scattered clouds.'
|
||||
] | random }}
|
||||
{% elif is_state('weather.iron_nerd_weather_station','sunny') %}
|
||||
{% if is_state('sun.sun','above_horizon') %}
|
||||
{{ [
|
||||
'and sunny.',
|
||||
'with sun.'
|
||||
] | random }}
|
||||
{% else %}
|
||||
{{ [
|
||||
'and clear.',
|
||||
'with clear skies.'
|
||||
] | random }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
and {{ states.weather.iron_nerd_weather_station.state }}
|
||||
{% endif %}
|
||||
{{ states('sensor.current_conditions_detail') }}
|
||||
|
||||
{% 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. "
|
||||
@ -75,6 +44,24 @@
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{{ [
|
||||
'The weather for the rest of today should be,',
|
||||
'The forecast for the rest of the day is,',
|
||||
'Through the rest of your day, the weather is expected to be,'
|
||||
] | random }}
|
||||
{{ states.sensor.current_forecast.state }}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{{ [
|
||||
'Just in case you were planning on going anywhere,',
|
||||
'On the off chance that you planned to go outside,',
|
||||
'If you were planning to go out and do something with your life,',
|
||||
] | random }}
|
||||
{{ states('sensor.clothing_forecast_detail') }}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{% if is_state('sun.sun','below_horizon') %}
|
||||
You have
|
||||
|
@ -20,56 +20,8 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{% if is_state('sensor.clothing_forecast', 'Freezing') %}
|
||||
It is going to be freezing today. so I suggest wearing long pants and a heavy coat.
|
||||
{% elif is_state('sensor.clothing_forecast','Cold') %}
|
||||
It is going to be cold today. so I suggest wearing long pants and a light jacket.
|
||||
{% elif is_state('sensor.clothing_forecast', 'Chilly') %}
|
||||
It is going to be chilly today. so I suggest wearing at least long pants.
|
||||
{% elif is_state('sensor.clothing_forecast', 'Nice') %}
|
||||
It is going to be
|
||||
{{ [ 'pretty nice outside. ',
|
||||
'a good day to be outside. ',
|
||||
'rather enjoyable outside. ',
|
||||
] | random }}
|
||||
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') %}
|
||||
It is going to be
|
||||
{{ [ ' rather warm outside. ',
|
||||
' almost too hot outside. ',
|
||||
' a little warm today. ',
|
||||
] | random }}
|
||||
So I suggest wearing shorts.
|
||||
{% elif is_state('sensor.clothing_forecast', 'Hot') %}
|
||||
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 }}
|
||||
So I suggest wearing shorts.
|
||||
{% else %}
|
||||
It is going to be {{ states.sensor.clothing_forecast.state }} today so I suggest wearing shorts.
|
||||
{% endif %}
|
||||
{% set hightemp = state_attr('sensor.current_forecast','high_temp') | float %}
|
||||
{% if hightemp > 84 %}
|
||||
Warning, today will be a very sweaty day, so you need to remember to stay hydrated.
|
||||
{% endif %}
|
||||
Today the high temperature will be {{ state_attr('sensor.current_forecast','high_temp') }} degrees.
|
||||
{{ states('sensor.clothing_forecast_detail') }}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
@ -66,7 +66,10 @@
|
||||
'The rest of the day should be,',
|
||||
'Todays forecast should be ,'
|
||||
]|random }}
|
||||
{{ states.sensor.current_forecast.state }}
|
||||
{{ states('sensor.current_forecast') }}
|
||||
</p>
|
||||
<p>
|
||||
{{ states('sensor.clothing_forecast_detail') }}
|
||||
</p>
|
||||
<p>
|
||||
{% if is_state('sensor.halloween_countdown','0') %}
|
||||
|
Reference in New Issue
Block a user