2020-06-12 20:02:42 +00:00
###############################################################################
# @author : Jeffrey Stone
# @date : 02/19/2019
# @package : Weather
# @description : Weather and NWS Alerts
# @original : https://github.com/Vasiley/Home-Assistant-Main/blob/master/packages/weather_alerts_nws.yaml
###############################################################################
homeassistant :
customize :
package.node_anchors :
customize : &customize
package : 'weather_alerts'
sensor.nws_alert_count :
friendly_name : Alerts
icon : mdi:alert-outline
2021-06-17 01:09:38 +00:00
# weather:
# # REMOVING darksky integration since API is EOL in 18 months. Migrated to NWS
# # - platform: darksky
# # api_key: !secret darksky_api
# - platform: nws
# api_key: !secret nws_api_key
# station: klzu
2020-06-12 20:02:42 +00:00
2022-02-25 04:27:01 +00:00
weather :
- platform : pirateweather
api_key : !secret pirate_weather_api
# Additional optional values:
#latitude: Location latitude
#longitude: Location longitude
mode : "daily"
name : Anchorage House
2020-06-12 20:02:42 +00:00
group :
alerts_card :
name : Alerts
entities :
- sensor.nws_alerts
input_boolean :
freeze_warning :
name : Freeze Warning
icon : mdi:snowflake-alert
weather_alert_texts :
name : Weather Alert Texts
icon : mdi:telegram
2020-08-22 03:28:38 +00:00
lightning_warning :
name : Lightning Warning
icon : mdi:flash-alert
2021-01-02 18:21:28 +00:00
tornado_alarm :
name : Tornado Alarm
icon : mdi:speaker-wireless
tstorm_alarm :
name : T-Storm Alarm
icon : mdi:speaker-wireless
2021-08-04 19:54:34 +00:00
raining :
name : Raining
utility_meter :
daily_rainfall_in :
source : sensor.acurite_rain899_2743_rt
cycle : daily
weekly_rainfall_in :
source : sensor.acurite_rain899_2743_rt
cycle : weekly
2021-08-15 20:44:14 +00:00
recent_lightning_strikes :
2021-08-04 19:54:34 +00:00
source : sensor.acurite_6045m_3078_strcnt
cycle : quarter-hourly
2020-06-12 20:02:42 +00:00
### You first need to find either your NWS Zone ID or County ID. I’ m not sure which is better but I used my Zone ID here.
### You can find your Zone ID by going to https://alerts.weather.gov/ 7, scroll down to your state and click on the “zone list” then look for the entry for your county.
### I recommond useing both
#I’ ve taken much of the underlying work here and created a custom component for nws alerts sensor.
#The sensor can be created by adding the nws_alerts.py file to <config_directory>/custom_components/sensor/ and adding the following to your sensor definitions:
sensor :
2021-06-17 01:09:38 +00:00
# - platform: nws_alerts
# zone_id: 'GAZ034,GAC135'
- platform : weatheralerts
state : GA
zone : 34
county : 135
2022-02-25 04:27:01 +00:00
- platform : pirateweather
api_key : !secret pirate_weather_api
scan_interval : '00:15:00'
monitored_conditions :
- temperature
- precip_probability
- precip_type
- humidity
- cloud_cover
- nearest_storm_distance
- precip_intensity
- wind_speed
2020-09-01 01:22:28 +00:00
- platform : statistics
name : Inside Humidity Stats
entity_id : sensor.current_inside_humidity
2021-12-18 15:27:53 +00:00
state_characteristic : mean
2020-09-01 01:22:28 +00:00
sampling_size : 500
2020-06-12 20:02:42 +00:00
- platform : template
sensors :
2022-03-02 03:08:45 +00:00
current_forecast :
friendly_name : Current Forecast
unit_of_measurement : ''
icon_template : mdi:weather-sunny
value_template : >-
2022-03-06 23:35:23 +00:00
{% set forecast = state_attr('weather.anchorage_house','forecast')[0] %}
2022-03-02 03:08:45 +00:00
{{ forecast.condition }}
attribute_templates :
high_temp : >-
2022-03-06 23:35:23 +00:00
{% set forecast = state_attr('weather.anchorage_house','forecast')[0] %}
2022-03-02 03:08:45 +00:00
{{ forecast.temperature }}
2022-03-06 23:35:23 +00:00
overnight_low : >-
{% set forecast = state_attr('weather.anchorage_house','forecast')[1] %}
{{ forecast.templow }}
2022-03-02 03:08:45 +00:00
wind_bearing : >-
2022-03-06 23:35:23 +00:00
{% set forecast = state_attr('weather.anchorage_house','forecast')[0] %}
2022-03-02 03:08:45 +00:00
{{ forecast.wind_bearing }}
wind_speed : >-
2022-03-06 23:35:23 +00:00
{% set forecast = state_attr('weather.anchorage_house','forecast')[0] %}
2022-03-02 03:08:45 +00:00
{{ forecast.wind_speed }}
2022-03-06 23:35:23 +00:00
precipitation : >-
{% set forecast = state_attr('weather.anchorage_house','forecast')[0] %}
{{ forecast.precipitation }}
current_forecast_detail :
friendly_name : Current Forecast Detail
2022-03-02 03:08:45 +00:00
unit_of_measurement : ''
icon_template : mdi:weather-sunny
value_template : >-
2022-03-06 23:35:23 +00:00
{%- macro getReport() -%}
{{ [
'Today in Grayson ' ,
'Later Today ' ,
'For the rest of the day'
] | random }}
expect a high of {{ state_attr('sensor.current_forecast','high_temp') }}
{%- if states('sensor.current_forecast') == 'sunny' and is_state('binary_sensor.night','off')%}
{{ [
'and sunny.' ,
'with sun.' ,
'with sunny conditions prevailing.'
] | random }}
{%- elif states('sensor.current_forecast') == 'sunny' and is_state('binary_sensor.night','on') %}
{{ [
'and clear.' ,
'with clear skies.'
] | random }}
{%- elif states('sensor.current_forecast') == 'clear-night' %}
{{ [
'and clear.' ,
'with clear skies.'
] | random }}
{%- elif states('sensor.current_forecast') == 'rainy' %}
{{ [
'with rain.' ,
'with showers.' ,
'and rainy.'
] | random }}
{{ [
'Rainfall accumulations ' ,
'Total Rainfall amounts '
] | random }}
near {{ state_attr('sensor.current_forecast','precipitation') }} inches
possible.
{%- elif states('sensor.current_forecast') == 'snowy' %}
{{ [
'with snow.' ,
'with snow showers.'
] | random }}
{{ [
'Snowfall accumulations ' ,
'Total snowfall amounts '
] | random }}
near {{ state_attr('sensor.current_forecast','precipitation') }} inches
possible.
{%- elif states('sensor.current_forecast') == 'snowy-rainy' %}
{{ [
'with mix preciptation possible.' ,
'with snow and rain showers.'
] | random }}
Total accumulation near {{ state_attr('sensor.current_forecast','precipitation') }} inches
possible.
{%- elif states('sensor.current_forecast') == 'windy' %}
{{ [
'and windy.' ,
'with lots of wind.'
] | random }}
{%- elif states('sensor.current_forecast') == 'fog' %}
{{ [
'and foggy.' ,
'with some fog.'
] | random }}
{% elif states('sensor.current_forecast') == 'cloudy' %}
{{ [
'with clouds.' ,
'with cloudy skies.'
] | random }}
{% elif states('sensor.current_forecast') == 'partlycloudy' %}
{{ [
'with some clouds.' ,
'with partly cloudy skies.' ,
'with scattered clouds'
] | random }}
{%- elif states('sensor.current_forecast') == 'hail' %}
{{ [
'with severve thunderstorms possible.' ,
'with hail possible.'
] | random }}
{{ [
'Rainfall accumulations ' ,
'Total Rainfall amounts '
] | random }}
near {{ state_attr('sensor.current_forecast','precipitation') }} inches
possible.
{%- elif states('sensor.current_forecast') == 'lightning' %}
{{ [
'with thunderstorms possible.' ,
'with the potential of thunderstorms.'
] | random }}
{{ [
'Rainfall accumulations ' ,
'Total Rainfall amounts '
] | random }}
near {{ state_attr('sensor.current_forecast','precipitation') }} inches
possible.
{% endif -%}
{{ [
'Later tonight expect a low of ' ,
'Overnight expect a low of '
] | random }}
{{ state_attr('sensor.current_forecast','overnight_low') }} degrees.
{%- endmacro -%}
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
{%- macro cleanup(data) -%}
{%- for item in data.split("\n") if item | trim != "" -%}
{{ item | trim }} {% endfor -%}
{%- endmacro -%}
{# a macro to call all macros :) #}
{%- macro mother_of_all_macros() -%}
{{ getReport() }}
{%- endmacro -%}
{# Call the macro #}
{{- cleanup(mother_of_all_macros()) -}}
2022-03-02 03:08:45 +00:00
tomorrow_forecast :
friendly_name : Tomorrows Forecast
unit_of_measurement : ''
icon_template : mdi:weather-sunny
value_template : >-
2022-03-06 23:35:23 +00:00
{% set forecast = state_attr('weather.anchorage_house','forecast')[1] %}
2022-03-02 03:08:45 +00:00
{{ forecast.condition }}
attribute_templates :
high_temp : >-
2022-03-06 23:35:23 +00:00
{% set forecast = state_attr('weather.anchorage_house','forecast')[1] %}
2022-03-02 03:08:45 +00:00
{{ forecast.temperature }}
2022-03-06 23:35:23 +00:00
overnight_low : >-
{% set forecast = state_attr('weather.anchorage_house','forecast')[2] %}
{{ forecast.templow }}
2022-03-02 03:08:45 +00:00
wind_bearing : >-
2022-03-06 23:35:23 +00:00
{% set forecast = state_attr('weather.anchorage_house','forecast')[1] %}
2022-03-02 03:08:45 +00:00
{{ forecast.wind_bearing }}
wind_speed : >-
2022-03-06 23:35:23 +00:00
{% set forecast = state_attr('weather.anchorage_house','forecast')[1] %}
2022-03-02 03:08:45 +00:00
{{ forecast.wind_speed }}
2022-03-06 23:35:23 +00:00
precipitation : >-
{% set forecast = state_attr('weather.anchorage_house','forecast')[1] %}
{{ forecast.precipitation }}
tomorrow_forecast_detail :
friendly_name : Tomorrow Forecast Detail
unit_of_measurement : ''
icon_template : mdi:weather-sunny
value_template : >-
{%- macro getReport() -%}
{{ [
'Tomorrow in Grayson ' ,
'For the next day ' ,
'Tomorrow '
] | random }}
expect a high of {{ state_attr('sensor.tomorrow_forecast','high_temp') }}
{%- if states('sensor.tomorrow_forecast') == 'sunny' %}
{{ [
'and sunny.' ,
'with sun.' ,
'with sunny conditions prevailing.'
] | random }}
{%- elif states('sensor.tomorrow_forecast') == 'rainy' %}
{{ [
'with rain.' ,
'with showers.' ,
'and rainy.'
] | random }}
{{ [
'Rainfall accumulations ' ,
'Total Rainfall amounts '
] | random }}
near {{ state_attr('sensor.tomorrow_forecast','precipitation') }} inches
possible.
{%- elif states('sensor.tomorrow_forecast') == 'snowy' %}
{{ [
'with snow.' ,
'with snow showers.'
] | random }}
{{ [
'Snowfall accumulations ' ,
'Total snowfall amounts '
] | random }}
near {{ state_attr('sensor.tomorrow_forecast','precipitation') }} inches
possible.
{%- elif states('sensor.tomorrow_forecast') == 'snowy-rainy' %}
{{ [
'with mix preciptation possible.' ,
'with snow and rain showers.'
] | random }}
Total accumulation near {{ state_attr('sensor.tomorrow_forecast','precipitation') }} inches
possible.
{%- elif states('sensor.tomorrow_forecast') == 'windy' %}
{{ [
'and windy.' ,
'with lots of wind.'
] | random }}
{%- elif states('sensor.current_forecast') == 'fog' %}
{{ [
'and foggy.' ,
'with some fog.'
] | random }}
{% elif states('sensor.tomorrow_forecast') == 'cloudy' %}
{{ [
'with clouds.' ,
'with cloudy skies.'
] | random }}
{% elif states('sensor.tomorrow_forecast') == 'partlycloudy' %}
{{ [
'with some clouds.' ,
'with partly cloudy skies.' ,
'with scattered clouds'
] | random }}
{%- elif states('sensor.tomorrow_forecast') == 'hail' %}
{{ [
'with severve thunderstorms possible.' ,
'with hail possible.'
] | random }}
{{ [
'Rainfall accumulations ' ,
'Total Rainfall amounts '
] | random }}
near {{ state_attr('sensor.current_forecast','precipitation') }} inches
possible.
{%- elif states('sensor.current_forecast') == 'lightning' %}
{{ [
'with thunderstorms possible.' ,
'with the potential of thunderstorms.'
] | random }}
{{ [
'Rainfall accumulations ' ,
'Total Rainfall amounts '
] | random }}
near {{ state_attr('sensor.current_forecast','precipitation') }} inches
possible.
{% endif -%}
{{ [
' Tomorrow night expect a low of '
] | random }}
{{ state_attr('sensor.tomorrow_forecast','overnight_low') }} degrees.
{%- endmacro -%}
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
{%- macro cleanup(data) -%}
{%- for item in data.split("\n") if item | trim != "" -%}
{{ item | trim }} {% endfor -%}
{%- endmacro -%}
{# a macro to call all macros :) #}
{%- macro mother_of_all_macros() -%}
{{ getReport() }}
{%- endmacro -%}
{# Call the macro #}
{{- cleanup(mother_of_all_macros()) -}}
current_conditions :
friendly_name : Current Conditions
unit_of_measurement : ''
icon_template : mdi:weather-sunny
value_template : >-
{%- macro getReport() -%}
The Weather in Grayson
{{ [
' is ' ,
' is currently '
] | random }}
{{states('sensor.acurite_6045m_3078_f')|round}} degrees
{% if is_state('weather.home', 'rainy') %}
{{ [
'with rain.' ,
'with showers.'
] | random }}
{% elif is_state('weather.home', 'cloudy') %}
{{ [
'with clouds.' ,
'with cloudy skies.'
] | random }}
{% elif is_state('weather.home', 'partlycloudy') %}
{{ [
'with some clouds.' ,
'with partly cloudy skies.' ,
'with scatterd clouds'
] | random }}
{% elif is_state('weather.home', 'sunny') %}
{% if is_state('sun.sun', 'above_horizon') %}
{{ [
'and sunny.' ,
'with sun.'
] | random }}
{% else %}
{{ [
'and clear.' ,
'with clear skies.'
] | random }}
{% endif %}
2022-03-02 03:08:45 +00:00
{% else %}
2022-03-06 23:35:23 +00:00
and {{ states.weather.home.state }}
2022-03-02 03:08:45 +00:00
{% endif %}
2022-03-06 23:35:23 +00:00
{%- endmacro -%}
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
{%- macro cleanup(data) -%}
{%- for item in data.split("\n") if item | trim != "" -%}
{{ item | trim }} {% endfor -%}
{%- endmacro -%}
{# a macro to call all macros :) #}
{%- macro mother_of_all_macros() -%}
{{ getReport() }}
{%- endmacro -%}
{# Call the macro #}
{{- cleanup(mother_of_all_macros()) -}}
current_conditions_detail :
friendly_name : Current Conditions Detail
unit_of_measurement : ''
icon_template : mdi:weather-sunny
value_template : >-
{%- macro getReport() -%}
The Weather in Grayson
{{ [
' is ' ,
' is currently '
] | random }}
{{states('sensor.acurite_6045m_3078_f')|round}} degrees
{% if is_state('weather.home', 'rainy') %}
{{ [
'with rain.' ,
'with showers.'
] | random }}
{% elif is_state('weather.home', 'cloudy') %}
{{ [
'with clouds.' ,
'with cloudy skies.'
] | random }}
{% elif is_state('weather.home', 'partlycloudy') %}
{{ [
'with some clouds.' ,
'with partly cloudy skies.' ,
'with scatterd clouds'
] | random }}
{% elif is_state('weather.home', 'sunny') %}
{% if is_state('sun.sun', 'above_horizon') %}
{{ [
'and sunny.' ,
'with sun.'
] | random }}
{% else %}
{{ [
'and clear.' ,
'with clear skies.'
] | random }}
{% endif %}
2022-03-02 03:08:45 +00:00
{% else %}
2022-03-06 23:35:23 +00:00
and {{ states.weather.home.state }}
2022-03-02 03:08:45 +00:00
{% endif %}
2022-03-06 23:35:23 +00:00
{%- if is_state('binary_sensor.night','off')%}
{{ [
'Later Today ' ,
'For the rest of the day'
] | random }}
expect a high of {{ state_attr('sensor.current_forecast','high_temp') }}
{%- if states('sensor.current_forecast') == 'sunny' and is_state('binary_sensor.night','off')%}
{{ [
'and sunny.' ,
'with sun.' ,
'with sunny conditions prevailing.'
] | random }}
{%- elif states('sensor.current_forecast') == 'sunny' and is_state('binary_sensor.night','on') %}
{{ [
'and clear.' ,
'with clear skies.'
] | random }}
{%- elif states('sensor.current_forecast') == 'clear-night' %}
{{ [
'and clear.' ,
'with clear skies.'
] | random }}
{%- elif states('sensor.current_forecast') == 'rainy' %}
{{ [
'with rain.' ,
'with showers.' ,
'and rainy.'
] | random }}
{{ [
'Rainfall accumulations ' ,
'Total Rainfall amounts '
] | random }}
near {{ state_attr('sensor.current_forecast','precipitation') }} inches
possible.
{%- elif states('sensor.current_forecast') == 'snowy' %}
{{ [
'with snow.' ,
'with snow showers.'
] | random }}
{{ [
'Snowfall accumulations ' ,
'Total snowfall amounts '
] | random }}
near {{ state_attr('sensor.current_forecast','precipitation') }} inches
possible.
{%- elif states('sensor.current_forecast') == 'snowy-rainy' %}
{{ [
'with mix preciptation possible.' ,
'with snow and rain showers.'
] | random }}
Total accumulation near {{ state_attr('sensor.current_forecast','precipitation') }} inches
possible.
{%- elif states('sensor.current_forecast') == 'windy' %}
{{ [
'and windy.' ,
'with lots of wind.'
] | random }}
{%- elif states('sensor.current_forecast') == 'fog' %}
{{ [
'and foggy.' ,
'with some fog.'
] | random }}
{% elif states('sensor.current_forecast') == 'cloudy' %}
{{ [
'with clouds.' ,
'with cloudy skies.'
] | random }}
{% elif states('sensor.current_forecast') == 'partlycloudy' %}
{{ [
'with some clouds.' ,
'with partly cloudy skies.' ,
'with scattered clouds'
] | random }}
{%- elif states('sensor.current_forecast') == 'hail' %}
{{ [
'with severve thunderstorms possible.' ,
'with hail possible.'
] | random }}
{{ [
'Rainfall accumulations ' ,
'Total Rainfall amounts '
] | random }}
near {{ state_attr('sensor.current_forecast','precipitation') }} inches
possible.
{%- elif states('sensor.current_forecast') == 'lightning' %}
{{ [
'with thunderstorms possible.' ,
'with the potential of thunderstorms.'
] | random }}
{{ [
'Rainfall accumulations ' ,
'Total Rainfall amounts '
] | random }}
near {{ state_attr('sensor.current_forecast','precipitation') }} inches
possible.
{% endif -%}
{{ [
'Later tonight expect a low of ' ,
'Overnight expect a low of '
] | random }}
{{ state_attr('sensor.current_forecast','overnight_low') }} degrees.
{%- else -%}
{{ [
'Tonight expect a low of ' ,
'Overnight expect a low of '
] | random }}
{{ state_attr('sensor.current_forecast','overnight_low') }} degrees.
{% endif %}
{%- endmacro -%}
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
{%- macro cleanup(data) -%}
{%- for item in data.split("\n") if item | trim != "" -%}
{{ item | trim }} {% endfor -%}
{%- endmacro -%}
{# a macro to call all macros :) #}
{%- macro mother_of_all_macros() -%}
{{ getReport() }}
{%- endmacro -%}
{# Call the macro #}
{{- cleanup(mother_of_all_macros()) -}}
2022-02-25 04:27:01 +00:00
outside_pressure :
friendly_name : 'outisde pressure'
value_template : '{{ state_attr(' 'weather.home' ',' 'pressure' ') }}'
unit_of_measurement : ''
2022-03-06 23:35:23 +00:00
todays_high_temp :
friendly_name : "Today's High Temp"
unit_of_measurement : ''
device_class : temperature
value_template : >-
{% set forecast = state_attr('weather.anchorage_house','forecast')[0] %}
{{ forecast.temperature }}
tonights_low_temp :
friendly_name : "Tonight's Low Temp"
unit_of_measurement : ''
device_class : temperature
value_template : >-
{% set forecast = state_attr('weather.anchorage_house','forecast')[1] %}
{{ forecast.lowtemp }}
2020-09-01 01:22:28 +00:00
clothing_forecast :
friendly_name : "Clothing Forecast"
unit_of_measurement : ''
value_template : >-
2022-03-06 23:35:23 +00:00
{% if is_state('binary_sensor.overnight', 'off') %}
{% set temp = states('sensor.todays_high_temp')|int %}
{% else %}
{% set temp = states('sensor.acurite_6045m_3078_f')|round %}
{% endif %}
{%- if states('sensor.todays_high_temp')|int > 63 %}
{%- if states('sensor.todays_high_temp')|int < 80 %}
2020-09-01 01:22:28 +00:00
Nice
2022-03-06 23:35:23 +00:00
{% elif states('sensor.todays_high_temp')|int > 95 %}
2020-09-01 01:22:28 +00:00
Hot
{% else %}
Toasty
{%- endif %}
2022-03-06 23:35:23 +00:00
{% elif states('sensor.todays_high_temp')|int < 64 %}
{%- if states('sensor.todays_high_temp')|int < 32 %}
2020-09-01 01:22:28 +00:00
Freezing
2022-03-06 23:35:23 +00:00
{% elif states('sensor.todays_high_temp')|int > 50 %}
2020-09-01 01:22:28 +00:00
Chilly
{% else %}
Cold
{%- endif %}
{% else %}
Unknown
{%- endif %}
2022-03-06 23:35:23 +00:00
clothing_forecast_detail :
friendly_name : "Clothing Forecast Detail"
2020-09-01 01:22:28 +00:00
unit_of_measurement : ''
value_template : >-
2022-03-06 23:35:23 +00:00
{% if is_state('binary_sensor.morning','on') %}
Based on the forecasted high temperature,
{% 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
{{ [ 'nice outside. ' ,
'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') %}
It is going to be
{{ [ 'bit warm ' ,
' rather warm outside ' ,
' almost too hot outside ' ,
' a little warm ' ,
] | random }}
today. So I suggest wearing shorts.
{% elif is_state('sensor.clothing_forecast', 'Hot') %}
It is going to be
{{ [ 'hot' ,
'hotter than the sun ' ,
'hotter than hot. but in a lot of bad ways ' ,
'hotter than the sun outside ' ,
'super hot ' ,
'hotter than the inside of a volcano '
] | random }}
today. So I suggest wearing shorts.
{% else %}
It is going to be {{ states.sensor.clothing_forecast.state }} today so I suggest wearing shorts.
{% endif %}
{% else %}
Based on the current temperature,
{% if is_state('sensor.clothing_forecast', 'Freezing') %}
It is freezing. so I suggest wearing long pants and a heavy coat if you are going out.
{% elif is_state('sensor.clothing_forecast','Cold') %}
It is cold outside. so I suggest wearing long pants and a light jacket.
{% elif is_state('sensor.clothing_forecast', 'Chilly') %}
It is chilly right now. so I suggest wearing at least long pants
if you are going to venture outside.
{% elif is_state('sensor.clothing_forecast', 'Nice') %}
It is
{{ [ 'nice outside. ' ,
'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') %}
It is
{{ [ 'bit warm ' ,
' rather warm outside ' ,
' almost too hot outside ' ,
' a little warm ' ,
] | random }}
outside. So I suggest wearing shorts.
{% elif is_state('sensor.clothing_forecast', 'Hot') %}
It is
{{ [ 'hot' ,
'hotter than the sun ' ,
'hotter than hot. but in a lot of bad ways ' ,
'hotter than the sun outside ' ,
'super hot ' ,
'hotter than the inside of a volcano '
] | random }}
outside. So I suggest wearing shorts.
{% else %}
It is {{ states.sensor.clothing_forecast.state }} right now so I suggest wearing shorts.
{% endif %}
{% endif %}
nws_current_visibility :
friendly_name : "Current Visability"
value_template : "{{ ((state_attr('weather.anchorage_house','visibility') | int) * 0.621371) | round }}"
2022-03-02 03:08:45 +00:00
2020-09-01 01:22:28 +00:00
current_inside_humidity :
friendly_name : "Current Inside Humidity"
unit_of_measurement : '%'
2022-03-02 03:08:45 +00:00
value_template : "{{ state_attr('climate.home','current_humidity') }}"
2020-09-01 01:22:28 +00:00
lighting_stike_count :
friendly_name : "Lightning Strike Count"
2021-08-15 20:44:14 +00:00
value_template : "{{ states('sensor.acurite_6045m_3078_strcnt') }}"
2021-08-28 19:52:42 +00:00
yesterday_rainfall_in :
friendly_name : "Yesterday Rainfall"
value_template : "{{ state_attr('sensor.daily_rainfall_in', 'last_period') }}"
2021-08-04 19:54:34 +00:00
previous_rainfall :
2021-08-15 20:44:14 +00:00
friendly_name : "Past 48h Rainfall"
2021-08-28 19:54:53 +00:00
value_template : "{{ states('sensor.daily_rainfall_in') | float + state_attr('sensor.daily_rainfall_in', 'last_period') | float }}"
2021-08-28 19:52:42 +00:00
lightning_warning :
friendly_name : "Lightning Warning"
value_template : >-
{%- if states('sensor.recent_lightning_strikes') | int > 0 %}
Unsafe
{% else %}
Safe
{%- endif %}
2021-08-04 19:54:34 +00:00
2020-06-12 20:02:42 +00:00
automation :
2021-08-04 19:54:34 +00:00
- alias : 'record previous day rainfall'
trigger :
- platform : time
at : '23:58:00'
action :
service : mqtt.publish
data_template :
topic : 'house/rain/yesterday_total'
retain : true
payload : "{{ states('sensor.todays_rainfall') }}"
2020-06-12 20:02:42 +00:00
- alias : Forecast Low Near Freezing
trigger :
- platform : numeric_state
2022-03-06 23:35:23 +00:00
entity_id : sensor.tonights_low_temp
2020-06-12 20:02:42 +00:00
below : 35
- platform : numeric_state
2022-03-06 23:35:23 +00:00
entity_id : sensor.pirateweather_temperature
2020-06-12 20:02:42 +00:00
below : 35
condition :
- condition : state
entity_id : input_boolean.freeze_warning
state : 'off'
action :
- service : input_boolean.turn_on
entity_id : input_boolean.freeze_warning
- alias : Forecast Low Above Freezing
trigger :
- platform : numeric_state
2022-03-06 23:35:23 +00:00
entity_id : sensor.tonights_low_temp
2020-06-12 20:02:42 +00:00
above : 33
condition :
- condition : state
entity_id : input_boolean.freeze_warning
state : 'on'
- condition : numeric_state
2022-03-06 23:35:23 +00:00
entity_id : sensor.tonights_low_temp
2020-06-12 20:02:42 +00:00
above : 35
action :
- service : input_boolean.turn_off
entity_id : input_boolean.freeze_warning
2021-06-17 01:09:38 +00:00
2020-06-12 20:02:42 +00:00
script :
2020-11-07 16:20:26 +00:00
2020-06-12 20:02:42 +00:00
refresh_weather_alert_sensors :
sequence :
- service : homeassistant.update_entity
entity_id : sensor.tornado_warning
- service : homeassistant.update_entity
entity_id : sensor.tornado_watch
- service : homeassistant.update_entity
entity_id : sensor.tstorm_warning
- service : homeassistant.update_entity
entity_id : sensor.tstorm_watch
- service : homeassistant.update_entity
entity_id : sensor.flood_warning
- service : homeassistant.update_entity
2020-08-22 03:28:38 +00:00
entity_id : sensor.flood_watch