configuration.yaml
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
# Text to speech
tts: !include tts.yaml
homeassistant:
customize: !include customize.yaml
allowlist_external_dirs:
- /media
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
recorder:
purge_keep_days: 5
envisalink: !include envisalink.yaml
switch: !include switch.yaml
input_boolean: !include input_boolean.yaml
google_assistant: !include google_assistant_integ.yaml
http: !include http.yaml
calendar: !include calendar.yaml
shell_command: !include shell_command.yaml
multiscrape: !include multiscrape.yaml
device_tracker: !include device_tracker.yaml
conversation: !include intents.yaml
intent_script: !include intent_scripts.yaml
#iperf3: !include iperf3.yaml
binary_sensor: !include binary_sensor.yaml
rest: !include rest.yaml
mqtt: !include mqtt.yaml
notify: !include notify.yaml
template: !include sensors.yaml
assist_pipeline:
This is my sensors.yaml
template:
- sensor:
storm_bearing_direction:
friendly_name: "Storm bearing direction"
icon_template: "mdi:compass"
value_template: >
{% set directions = [
'North','North North East','North East','East North East','East','East South East',
'South East','South South East','South','South South West','South West',
'West South West','West','West North West','North West','North North West','North'
] %}
{% set degree = states('sensor.pirateweather_nearest_storm_bearing') | float %}
{{ directions[((degree + 11.25) / 22.5) | int] }}
wind_bearing_direction:
friendly_name: "Wind bearing direction"
icon_template: "mdi:compass"
value_template: >
{% set directions = [
'North','North North East','North East','East North East','East','East South East',
'South East','South South East','South','South South West','South West',
'West South West','West','West North West','North West','North North West','North'
] %}
{% set degree = states('sensor.pirateweather_wind_bearing') | float %}
{{ directions[((degree + 11.25) / 22.5) | int] }}
lightning_direction:
friendly_name: "Lightning direction"
icon_template: "mdi:weather-lightning"
value_template: >
{% set directions = [
'North','North North East','North East','East North East','East','East South East',
'South East','South South East','South','South South West','South West',
'West South West','West','West North West','North West','North North West','North'
] %}
{% set degree = states('sensor.lighting_detection_lightning_azimuth') | float %}
{{ directions[((degree + 11.25) / 22.5) | int] }}
nws_alert_type:
friendly_name: "NWS alert type"
value_template: "{{ state_attr('sensor.nws_alerts', 'Alerts')[0].Event }}"
nws_alert_speak:
friendly_name: "NWS alert headline"
value_template: "{{ state_attr('sensor.nws_alerts', 'Alerts')[0].Headline }}"
wind_shear:
friendly_name: "Wind shear (m/s)"
unit_of_measurement: "m/s"
value_template: "{{ round((states('sensor.ads_ws1_average_wind_speed') | float - states('sensor.ads_ws1_wind_gust') | float), 2) }}"
allergy_today:
friendly_name: "Allergy today"
value_template: >
{% set allergy = states('sensor.allergy_index_today') | float %}
{% if allergy <= 2.4 %} Low
{% elif allergy <= 4.8 %} Low/High
{% elif allergy <= 7.2 %} Medium
{% elif allergy <= 9.6 %} Medium/High
{% elif allergy <= 12.0 %} High
{% else %} unavailable
{% endif %}
allergy_tomorrow:
friendly_name: "Allergy tomorrow"
value_template: >
{% set allergy = states('sensor.allergy_index_tomorrow') | float %}
{% if allergy <= 2.4 %} Low
{% elif allergy <= 4.8 %} Low/High
{% elif allergy <= 7.2 %} Medium
{% elif allergy <= 9.6 %} Medium/High
{% elif allergy <= 12.0 %} High
{% else %} unavailable
{% endif %}
allergy_forecast:
friendly_name: "Allergy forecast"
value_template: >
{% set allergy = states('sensor.allergy_index_forecasted_average') | float %}
{% if allergy <= 2.4 %} Low
{% elif allergy <= 4.8 %} Low/High
{% elif allergy <= 7.2 %} Medium
{% elif allergy <= 9.6 %} Medium/High
{% elif allergy <= 12.0 %} High
{% else %} unavailable
{% endif %}
home_to_work_delay:
friendly_name: "Home → Work delay (min)"
unit_of_measurement: "min"
value_template: >
{{
((states('sensor.df_electronics') | float(0) - 21) | round(0)) + 5
}}
speedtest_download_rounded:
unit_of_measurement: "Mbps"
value_template: >
{{
((states('sensor.speedtest_download') | float(0) / 1) | round(2))
}}
speedtest_upload_rounded:
unit_of_measurement: "Mbps"
value_template: >
{{
((states('sensor.speedtest_upload') | float(0) / 1) | round(2))
}}
storm_direction:
friendly_name: "Storm direction"
icon_template: "mdi:compass"
value_template: >
{% set directions = [
'North','North North East','North East','East North East','East','East South East',
'South East','South South East','South','South South West','South West',
'West South West','West','West North West','North West','North North West','North'
] %}
{% set degree = states('sensor.pirateweather_nearest_storm_bearing') | float %}
{{ directions[((degree + 11.25) / 22.5) | int] }}
wind_direction:
friendly_name: "Wind bearing direction"
icon_template: "mdi:compass"
value_template: >
{% set directions = [
'North','North North East','North East','East North East','East','East South East',
'South East','South South East','South','South South West','South West',
'West South West','West','West North West','North West','North North West','North'
] %}
{% set degree = states('sensor.pirateweather_wind_bearing') | float %}
{{ directions[((degree + 11.25) / 22.5) | int] }}
lightning_home:
friendly_name: "Home Lightning direction"
icon_template: "mdi:weather-lightning"
value_template: >
{% set directions = [
'North','North North East','North East','East North East','East','East South East',
'South East','South South East','South','South South West','South West',
'West South West','West','West North West','North West','North North West','North'
] %}
{% set degree = states('sensor.lighting_detection_lightning_azimuth') | float %}
{{ directions[((degree + 11.25) / 22.5) | int] }}
nws_type:
friendly_name: "NWS alert type"
value_template: "{{ state_attr('sensor.nws_alerts', 'Alerts')[0].Event }}"
nws_speak:
friendly_name: "NWS alert headline"
value_template: "{{ state_attr('sensor.nws_alerts', 'Alerts')[0].Headline }}"
wind_speed:
friendly_name: "Wind shear (m/s)"
unit_of_measurement: "m/s"
value_template: "{{ round((states('sensor.ads_ws1_average_wind_speed') | float - states('sensor.ads_ws1_wind_gust') | float), 2) }}"
allergy_now:
friendly_name: "Allergy today"
value_template: >
{% set allergy = states('sensor.allergy_index_today') | float %}
{% if allergy <= 2.4 %} Low
{% elif allergy <= 4.8 %} Low/High
{% elif allergy <= 7.2 %} Medium
{% elif allergy <= 9.6 %} Medium/High
{% elif allergy <= 12.0 %} High
{% else %} unavailable
{% endif %}
allergy_tom:
friendly_name: "Allergy tomorrow"
value_template: >
{% set allergy = states('sensor.allergy_index_tomorrow') | float %}
{% if allergy <= 2.4 %} Low
{% elif allergy <= 4.8 %} Low/High
{% elif allergy <= 7.2 %} Medium
{% elif allergy <= 9.6 %} Medium/High
{% elif allergy <= 12.0 %} High
{% else %} unavailable
{% endif %}
allergy_fore:
friendly_name: "Allergy forecast"
value_template: >
{% set allergy = states('sensor.allergy_index_forecasted_average') | float %}
{% if allergy <= 2.4 %} Low
{% elif allergy <= 4.8 %} Low/High
{% elif allergy <= 7.2 %} Medium
{% elif allergy <= 9.6 %} Medium/High
{% elif allergy <= 12.0 %} High
{% else %} unavailable
{% endif %}
work_delay:
friendly_name: "Home → Work delay (min)"
unit_of_measurement: "min"
value_template: >
{{
((states('sensor.df_electronics') | float(0) - 21) | round(0)) + 5
}}
speedtest_download_round:
unit_of_measurement: "Mbps"
friendly_name: "Rounded Download Speedtest "
value_template: >
{{
((states('sensor.speedtest_download') | float(0) / 1) | round(2))
}}
speedtest_upload_round:
friendly_name: ""
unit_of_measurement: "Mbps"
value_template: >
{{
((states('sensor.speedtest_upload') | float(0) / 1) | round(2))
}}
This is so messed up that my binary_sensors.yaml just quit working.