Add UUID to all remaining sensors, remove bad units_of_measure #70

This commit is contained in:
2023-03-23 14:28:34 -04:00
parent 620b015f30
commit 8ec200fca3
13 changed files with 100 additions and 13 deletions

View File

@ -3,18 +3,22 @@ sensor:
sensors:
master_bedroom_current_temp:
friendly_name: "Master Bedroom Current Temp"
unique_id: 40c6b591-09d3-45cd-8cab-9838517cc08a
value_template: >
{{ state_attr('climate.master_bedroom_aircon','current_temperature') | float }}
master_bedroom_outdoor_temp:
friendly_name: "Master Bedroom Outdoor Temp"
unique_id: 1a79ac59-0faf-4de5-b546-5d6d5e151dd6
value_template: >
{{ state_attr('climate.master_bedroom_aircon','outdoor_temperature') | float }}
master_bedroom_target_temp:
friendly_name: "Master Bedroom Target Temp"
unique_id: 2ce31844-b115-42b8-8213-feccf24e236c
value_template: >
{{ state_attr('climate.master_bedroom_aircon','temperature') | float }}
master_bedroom_aircon_eco_mode:
friendly_name: "Master Bedroom Eco Mode"
unique_id: edf36e23-adcf-4506-80eb-a14f4ea2fce0
value_template: >-
{% if is_state_attr('climate.master_bedroom_aircon','preset_mode','eco') %}
On
@ -34,6 +38,7 @@ sensor:
availability_template: "{{ states('climate.master_bedroom_aircon') not in ['unavailable','unknown'] }}"
master_bedroom_aircon_fan_mode:
friendly_name: "Master Bedroom Aircon Fan Mode"
unique_id: c0e4f9ba-0c6c-4673-9a75-13f253f2f2e8
value_template: >
{{ state_attr('climate.master_bedroom_aircon','fan_mode') }}
icon_template: >

View File

@ -20,6 +20,7 @@ weather:
template:
- binary_sensor:
- name: Heat Threshold
unique_id: 849a08bb-d4e6-40e9-ae42-50f7fb71b727
state: >
{% set temp = states('sensor.pirateweather_temperature') | int %}
{% set threshold = states('input_number.hot_day_threshold') | int %}
@ -33,6 +34,7 @@ template:
current_temp: "{{ states('sensor.pirateweather_temperature') | int }}"
threshold: "{{ states('input_number.hot_day_threshold') | int }}"
- name: Heat Index Threshold
unique_id: aae2cd89-dde2-4557-923c-b476d1b49b88
state: >
{% set feelslike = states('sensor.pirateweather_apparent_temperature') | int %}
{% set threshold = states('input_number.heat_index_threshold') | int %}
@ -46,6 +48,7 @@ template:
current_temp: "{{ states('sensor.pirateweather_apparent_temperature') | int }}"
threshold: "{{ states('input_number.heat_index_threshold') | int }}"
- name: Cold Threshold
unique_id: a7c97b91-6d42-433a-a96b-94e39c58d63f
state: >
{% set temp = states('sensor.pirateweather_temperature') | int %}
{% set threshold = states('input_number.cold_day_threshold') | int %}
@ -59,6 +62,7 @@ template:
current_temp: "{{ states('sensor.pirateweather_temperature') | int }}"
threshold: "{{ states('input_number.cold_day_threshold') | int }}"
- name: Overnight Low Threshold
unique_id: 6869e6eb-c8a6-43c8-aa4d-4d50659811b8
state: >
{% set temp = states('sensor.pirateweather_temperature') | int %}
{% set threshold = states('input_number.overnight_low_threshold') | int%}
@ -72,6 +76,7 @@ template:
current_temp: "{{ states('sensor.pirateweather_temperature') | int }}"
threshold: "{{ states('input_number.overnight_low_threshold') | int }}"
- name: Wind Chill Threshold
unique_id: c734b642-b85d-465c-b3c3-aadbe4a00dc1
state: >
{% set feelslike = states('sensor.pirateweather_apparent_temperature') | int %}
{% set threshold = states('input_number.wind_chill_threshold') | int %}
@ -132,7 +137,6 @@ sensor:
current_forecast:
friendly_name: Current Forecast
unique_id: c0faea33-2ac3-40f1-8558-584c3f5d6b16
unit_of_measurement: ''
icon_template: mdi:weather-sunny
value_template: >-
{% set forecast = state_attr('weather.iron_nerd_weather_station','forecast')[0] %}
@ -156,7 +160,6 @@ sensor:
current_forecast_detail:
friendly_name: Current Forecast Detail
unique_id: e5ae9864-70b5-402c-9d2f-c4d6a10085df
unit_of_measurement: ''
icon_template: mdi:weather-sunny
value_template: >-
{%- macro getReport() -%}
@ -277,7 +280,6 @@ sensor:
tomorrow_forecast:
friendly_name: Tomorrows Forecast
unique_id: a8ae26b0-ed26-4568-bb2b-f7c72707b009
unit_of_measurement: ''
icon_template: mdi:weather-sunny
value_template: >-
{% set forecast = state_attr('weather.iron_nerd_weather_station','forecast')[1] %}
@ -301,7 +303,6 @@ sensor:
tomorrow_forecast_detail:
friendly_name: Tomorrow Forecast Detail
unique_id: 21374ed0-80d1-49ba-817d-3e93eb3865e4
unit_of_measurement: ''
icon_template: mdi:weather-sunny
value_template: >-
{%- macro getReport() -%}
@ -411,7 +412,6 @@ sensor:
current_conditions:
friendly_name: Current Conditions
unique_id: 70db7e57-08db-48b2-919b-03b5face37b9
unit_of_measurement: ''
icon_template: mdi:weather-sunny
value_template: >-
{%- macro getReport() -%}
@ -468,7 +468,6 @@ sensor:
current_conditions_detail:
friendly_name: Current Conditions Detail
unique_id: 2b3687d1-bdd5-4551-8c0a-05b1ff617543
unit_of_measurement: ''
icon_template: mdi:weather-sunny
value_template: >-
{%- macro getReport() -%}
@ -636,7 +635,7 @@ sensor:
todays_high_temp:
friendly_name: "Today's High Temp"
unique_id: 532904af-940b-45cd-af8e-c69d1a9c4531
unit_of_measurement: ''
unit_of_measurement: '°F'
device_class: temperature
value_template: >-
{% set forecast = state_attr('weather.iron_nerd_weather_station','forecast')[0] %}
@ -644,7 +643,7 @@ sensor:
tonights_low_temp:
friendly_name: "Tonight's Low Temp"
unique_id: 8ddc55b6-4728-4897-a32f-90be970f744b
unit_of_measurement: ''
unit_of_measurement: '°F'
device_class: temperature
value_template: >-
{% set forecast = state_attr('weather.iron_nerd_weather_station','forecast')[0] %}
@ -652,7 +651,6 @@ sensor:
clothing_forecast:
friendly_name: "Clothing Forecast"
unique_id: 8ed2684b-d0ad-402c-bc3c-340cb9b2437a
unit_of_measurement: ''
value_template: >-
{% if is_state('binary_sensor.overnight', 'off') %}
{% set temp = states('sensor.todays_high_temp')|int %}
@ -681,7 +679,6 @@ sensor:
clothing_forecast_detail:
friendly_name: "Clothing Forecast Detail"
unique_id: 13065f50-5eef-4afd-830e-2a2c87f47496
unit_of_measurement: ''
value_template: >-
{%- macro getReport() -%}
{% if is_state('binary_sensor.morning','on') %}

View File

@ -262,6 +262,7 @@ sensor:
sensors:
basement_studio_lights_brightness_actual:
friendly_name: "Basement Studio Lights - Brightness Actual"
unique_id: dee4dc84-a6a0-4150-903e-5b8bd436d962
value_template: >
{% set current = state_attr('light.basement_studio_lights','brightness') %}
{{ ((current / 255) * 100) | float | round(2) }}
@ -275,6 +276,7 @@ sensor:
icon_template: mdi:brightness-percent
basement_studio_lights_brightness_intended:
friendly_name: "Basement Studio Lights - Brightness Intended"
unique_id: 3542077f-24c6-460c-a73f-fe7bc8413b81
value_template: "{{ state_attr('switch.adaptive_lighting_basement_studio','brightness_pct') | float | round(2) }}"
availability_template: >
{% if is_state('switch.adaptive_lighting_basement_studio','on') %}
@ -286,6 +288,7 @@ sensor:
icon_template: mdi:brightness-percent
basement_studio_lights_colortemp_actual:
friendly_name: "Basement Studio Lights - Colortemp Actual"
unique_id: 93cb2a2f-c8a7-44bf-813f-26ce349a072f
value_template: "{{ state_attr('light.basement_studio_lights','color_temp_kelvin') | int }}"
availability_template: >
{% if is_state('light.basement_studio_lights','on') %}
@ -297,6 +300,7 @@ sensor:
icon_template: mdi:thermometer-lines
basement_studio_lights_colortemp_intended:
friendly_name: "Basement Studio Lights - Colortemp Intended"
unique_id: 85d4b063-bae8-43c2-9fea-35820b13f26f
value_template: "{{ state_attr('switch.adaptive_lighting_basement_studio','color_temp_kelvin') | int }}"
availability_template: >
{% if is_state('switch.adaptive_lighting_basement_studio','on') %}
@ -308,6 +312,7 @@ sensor:
icon_template: mdi:thermometer-lines
basement_studio_lights_brightness_diff:
friendly_name: "Basement Studio Lights - Brightness Diff"
unique_id: ab24a44c-6c6b-4ae9-b256-52592b0503bb
value_template: >
{% set current = states('sensor.basement_studio_lights_brightness_actual') | float %}
{% set intended = states('sensor.basement_studio_lights_brightness_intended') | float %}
@ -322,6 +327,7 @@ sensor:
icon_template: mdi:brightness-percent
basement_studio_lights_colortemp_diff:
friendly_name: "Basement Studio Lights - Colortemp Diff"
unique_id: fecf7d42-9a5c-471e-9af3-e1a330a6ae3e
value_template: >
{% set current = states('sensor.basement_studio_lights_colortemp_actual') | float %}
{% set intended = states('sensor.basement_studio_lights_colortemp_intended') | float %}

View File

@ -77,7 +77,6 @@ sensor:
tony_location:
friendly_name: "Tony"
unique_id: 2620a9d0-01f0-4af4-8438-a0c860735aab
unit_of_measurement: ""
value_template: >-
{% set person = states.person.tony_stork.state %}
{% if person in ['Home','home'] %}
@ -103,7 +102,6 @@ sensor:
tina_location:
friendly_name: "Tina"
unique_id: 5439165c-f73e-4870-826a-d12c99e35487
unit_of_measurement: ""
value_template: >-
{% set person = states.person.christina_stork.state %}
{% if person in ['Home','home'] %}
@ -131,7 +129,6 @@ sensor:
kallen_location:
friendly_name: "Kallen"
unique_id: d4b4c324-52aa-41e4-b446-8ba0d6b45cd3
unit_of_measurement: ""
value_template: >-
{% set person = states.person.kallen_stork.state %}
{% if person in ['Home','home'] %}
@ -280,14 +277,17 @@ template:
mqtt:
sensor:
- name: "Family Status"
unique_id: 47d0cef6-6c95-4e8e-bf89-6c657db6102c
state_topic: "house/family/status"
payload_available: "online"
payload_not_available: "offline"
- name: "Family Arrived"
unique_id: a6574daf-5345-43b9-90c8-5e99ce56df0b
state_topic: "house/family/arrived"
payload_available: "online"
payload_not_available: "offline"
- name: "Last Outdoor Presence Trigger"
unique_id: f16493e7-0344-4f2b-94b4-2c89ab0e3eb6
state_topic: "house/presence/outdoor/last_trigger"
payload_available: "online"
payload_not_available: "offline"

View File

@ -75,16 +75,19 @@ sensor:
- platform: template
sensors:
school_start_days2go:
unique_id: 94a53e67-c00f-4cc7-9309-f9033a9482f9
value_template: "{{ ((state_attr('input_datetime.school_first_day', 'timestamp')-as_timestamp(now())) | int /60/1440) | round(0) }}"
attribute_templates:
date: "{{ state_attr('input_datetime.school_first_day','timestamp') | timestamp_custom('%B %d, %Y') }}"
unit_of_measurement: 'Days'
school_end_days2go:
unique_id: 589c44ec-7e16-4c72-a264-cdf54de409a9
value_template: "{{ ((state_attr('input_datetime.school_last_day', 'timestamp')-as_timestamp(now())) | int /60/1440) | round(0) }}"
attribute_templates:
date: "{{ state_attr('input_datetime.school_last_day','timestamp') | timestamp_custom('%B %d, %Y') }}"
unit_of_measurement: 'Days'
vacation_days2go:
unique_id: f1628d87-e58a-4d1a-8a49-a71f0a9ed3e5
value_template: >
{% if state_attr('calendar.vacation', 'start_time') %}
{{ ((as_timestamp(strptime(state_attr('calendar.vacation', 'start_time'), '%Y-%m-%d'))-as_timestamp(now())) | int /60/1440) | round(0) }}
@ -93,16 +96,19 @@ sensor:
{% endif %}
unit_of_measurement: 'Days'
thanksgiving_break_days2go:
unique_id: 2381e9de-407b-4304-b09a-448c169bbaf2
value_template: "{{ ((state_attr('input_datetime.thanksgiving_break_start', 'timestamp')-as_timestamp(now())) | int /60/1440) | round(0) }}"
attribute_templates:
date: "{{ state_attr('input_datetime.thanksgiving_break_start','timestamp') | timestamp_custom('%B %d, %Y') }}"
unit_of_measurement: 'Days'
christmas_break_days2go:
unique_id: 851700f7-c593-4db8-ba4f-001cbffcfc4a
value_template: "{{ ((state_attr('input_datetime.christmas_break_start', 'timestamp')-as_timestamp(now())) | int /60/1440) | round(0) }}"
attribute_templates:
date: "{{ state_attr('input_datetime.christmas_break_start','timestamp') | timestamp_custom('%B %d, %Y') }}"
unit_of_measurement: 'Days'
spring_break_days2go:
unique_id: cec6e687-8999-4548-991c-02ba546335f5
value_template: "{{ ((state_attr('input_datetime.spring_break_start', 'timestamp')-as_timestamp(now())) | int /60/1440) | round(0) }}"
attribute_templates:
date: "{{ state_attr('input_datetime.spring_break_start','timestamp') | timestamp_custom('%B %d, %Y') }}"
@ -131,6 +137,7 @@ sensor:
{% endif %}
kallen_lunch_menu_week:
friendly_name: Lunch Menu Week
unique_id: 62ba9dcb-3cd3-4875-8e6f-86bebf542c37
value_template: >
{% if is_state('calendar.elementary_school_lunch','on') %}
{{ state_attr('calendar.elementary_school_lunch','message') }}
@ -151,6 +158,7 @@ sensor:
{% endif %}
kallen_lunch_menu_items:
friendly_name: Lunch Menu Items
unique_id: a2cb62d7-ae9f-4bab-81c1-81f2006391b2
icon_template: >
{% set week = states('sensor.kallen_lunch_menu_week') %}
{% if week == 'First Menu' %}

View File

@ -57,6 +57,7 @@ sensor:
sensors:
windows_open:
friendly_name: "Windows"
unique_id: 780770d2-8b5a-4c96-aee4-459281cc3471
unit_of_measurement: 'open'
value_template: >-
{% set windows = [
@ -82,6 +83,7 @@ sensor:
{% endif %}
doors_open: #! This sensor is only for exterior doors, and interior doors that are NOT excluded from security protocols
friendly_name: "Doors"
unique_id: 61b1a98a-51a4-4faa-947d-7883de2430c0
unit_of_measurement: 'open'
value_template: >-
{% set doors = [
@ -103,6 +105,7 @@ sensor:
{% endif %}
interior_doors_open: # This sensor is not used for security purposes, only for information
friendly_name: "Interior Doors"
unique_id: 772aa056-881a-4778-ba5b-19e46afc107a
unit_of_measurement: 'open'
value_template: >-
{% set doors = [
@ -124,6 +127,7 @@ sensor:
{% endif %}
total_faults:
friendly_name: Faults
unique_id: 1629a83a-a46c-4041-9e49-8e54c5195388
unit_of_measurement: 'open'
value_template: >-
{% set windows_open = states('sensor.windows_open') | int %}

View File

@ -9,6 +9,7 @@ input_boolean:
template:
- binary_sensor:
- name: Michigan Wolverines Inhibit
unique_id: f361b30c-1771-41b3-85ff-ef1e0b6be59c
state: >
{% if state_attr('sensor.michigan_wolverines','kickoff_in') %}
{% if 'months' in state_attr('sensor.michigan_wolverines','kickoff_in') %}
@ -22,6 +23,7 @@ template:
false
{% endif %}
- name: Ohio State Buckeyes Inhibit
unique_id: d5359cb4-427a-46f8-99d6-4313530fde81
state: >
{% if state_attr('sensor.ohio_state_buckeyes','kickoff_in') %}
{% if 'months' in state_attr('sensor.ohio_state_buckeyes','kickoff_in') %}
@ -35,6 +37,7 @@ template:
false
{% endif %}
- name: Toledo Rockets Inhibit
unique_id: 1f84d3f3-a06e-4745-a593-c21fe3504072
state: >
{% if state_attr('sensor.toledo_rockets','kickoff_in') %}
{% if 'months' in state_attr('sensor.toledo_rockets','kickoff_in') %}
@ -48,6 +51,7 @@ template:
false
{% endif %}
- name: Minnesota Vikings Inhibit
unique_id: ea60c987-a95b-4024-a9c7-1bc6975e07e2
state: >
{% if state_attr('sensor.minnesota_vikings','kickoff_in') %}
{% if 'months' in state_attr('sensor.minnesota_vikings','kickoff_in') %}
@ -61,6 +65,7 @@ template:
false
{% endif %}
- name: San Francisco 49ers Inhibit
unique_id: ce2441fa-09d6-4afc-b350-fee3745cdb50
state: >
{% if state_attr('sensor.san_francisco_49ers','kickoff_in') %}
{% if 'months' in state_attr('sensor.san_francisco_49ers','kickoff_in') %}
@ -74,6 +79,7 @@ template:
false
{% endif %}
- name: Cleveland Guardians Inhibit
unique_id: b0980d47-d762-4f23-97b1-9e88da729d8f
state: >
{% if state_attr('sensor.cleveland_guardians','kickoff_in') %}
{% if 'months' in state_attr('sensor.cleveland_guardians','kickoff_in') %}
@ -87,6 +93,7 @@ template:
false
{% endif %}
- name: Minnesota Twins Inhibit
unique_id: 2987ae95-f55d-4994-b9dd-018278d2f5ad
state: >
{% if state_attr('sensor.minnesota_twins','kickoff_in') %}
{% if 'months' in state_attr('sensor.minnesota_twins','kickoff_in') %}
@ -100,6 +107,7 @@ template:
false
{% endif %}
- name: Los Angeles Dodgers Inhibit
unique_id: 2c6aae6e-eff6-46e5-bee9-311f9bbc0c0e
state: >
{% if state_attr('sensor.los_angeles_dodgers','kickoff_in') %}
{% if 'months' in state_attr('sensor.los_angeles_dodgers','kickoff_in') %}

View File

@ -54,6 +54,7 @@ sensor:
## You can add your county or city name to friendly_name for personalization
## For example: Weather Alerts for YourCountyName
friendly_name: Weather Alerts
unique_id: 32371252-89ff-47b2-86e3-32ef92a05205
unit_of_measurement: Alerts
icon_template: mdi:alert-rhombus
value_template: >-
@ -229,6 +230,7 @@ sensor:
{{ test.count }}
weatheralerts_alert_1:
friendly_name: Weather Alert 1
unique_id: 752fb9ae-a61f-41f8-8882-f8d025b892e3
icon_template: mdi:alert-rhombus
value_template: >-
{% if (states('sensor.weatheralerts') != 'unavailable') and (state_attr('sensor.weatheralerts', 'alerts')[0] != null) or ((states('sensor.weatheralerts') == 'unavailable') and (as_timestamp(state_attr('sensor.weatheralerts', 'alerts')[0].endsExpires) - as_timestamp(now()) > 0)) %}
@ -392,6 +394,7 @@ sensor:
{% endif %}
weatheralerts_alert_2:
friendly_name: Weather Alert 2
unique_id: 4ecaa8ce-65ec-429f-956c-ac478f1c3d6f
icon_template: mdi:alert-rhombus
value_template: >-
{% if (states('sensor.weatheralerts') != 'unavailable') and (state_attr('sensor.weatheralerts', 'alerts')[1] != null) or ((states('sensor.weatheralerts') == 'unavailable') and (as_timestamp(state_attr('sensor.weatheralerts', 'alerts')[1].endsExpires) - as_timestamp(now()) > 0)) %}
@ -555,6 +558,7 @@ sensor:
{% endif %}
weatheralerts_alert_3:
friendly_name: Weather Alert 3
unique_id: 0dcc3731-c90e-427a-abd9-dee29a5ed1e1
icon_template: mdi:alert-rhombus
value_template: >-
{% if (states('sensor.weatheralerts') != 'unavailable') and (state_attr('sensor.weatheralerts', 'alerts')[2] != null) or ((states('sensor.weatheralerts') == 'unavailable') and (as_timestamp(state_attr('sensor.weatheralerts', 'alerts')[2].endsExpires) - as_timestamp(now()) > 0)) %}
@ -718,6 +722,7 @@ sensor:
{% endif %}
weatheralerts_alert_4:
friendly_name: Weather Alert 4
unique_id: 18f756d2-f3aa-476f-a1c0-12c70f173ead
icon_template: mdi:alert-rhombus
value_template: >-
{% if (states('sensor.weatheralerts') != 'unavailable') and (state_attr('sensor.weatheralerts', 'alerts')[3] != null) or ((states('sensor.weatheralerts') == 'unavailable') and (as_timestamp(state_attr('sensor.weatheralerts', 'alerts')[3].endsExpires) - as_timestamp(now()) > 0)) %}
@ -881,6 +886,7 @@ sensor:
{% endif %}
weatheralerts_alert_5:
friendly_name: Weather Alert 5
unique_id: c9690a26-84e8-439d-9718-469b227c4d66
icon_template: mdi:alert-rhombus
value_template: >-
{% if (states('sensor.weatheralerts') != 'unavailable') and (state_attr('sensor.weatheralerts', 'alerts')[4] != null) or ((states('sensor.weatheralerts') == 'unavailable') and (as_timestamp(state_attr('sensor.weatheralerts', 'alerts')[4].endsExpires) - as_timestamp(now()) > 0)) %}
@ -1043,6 +1049,7 @@ sensor:
None
{% endif %}
weatheralerts_alert_1_last_changed:
unique_id: 3db32f1f-a6d3-4321-9078-2577d403f314
value_template: >-
{% if states('sensor.weatheralerts_alert_1') == "on" %}
{{ states.sensor.weatheralerts_alert_1.last_updated }}
@ -1050,6 +1057,7 @@ sensor:
None
{% endif %}
weatheralerts_alert_2_last_changed:
unique_id: 75e746a0-b776-4dbb-b018-1e808a204f65
value_template: >-
{% if states('sensor.weatheralerts_alert_2') == "on" %}
{{ states.sensor.weatheralerts_alert_2.last_updated }}
@ -1057,6 +1065,7 @@ sensor:
None
{% endif %}
weatheralerts_alert_3_last_changed:
unique_id: 4382f9a3-32bf-42f9-809f-ae33f33140b7
value_template: >-
{% if states('sensor.weatheralerts_alert_3') == "on" %}
{{ states.sensor.weatheralerts_alert_3.last_updated }}
@ -1064,6 +1073,7 @@ sensor:
None
{% endif %}
weatheralerts_alert_4_last_changed:
unique_id: 4fbf5547-eac4-4ebf-b5fc-b043fafc0026
value_template: >-
{% if states('sensor.weatheralerts_alert_4') == "on" %}
{{ states.sensor.weatheralerts_alert_4.last_updated }}
@ -1071,6 +1081,7 @@ sensor:
None
{% endif %}
weatheralerts_alert_5_last_changed:
unique_id: d7b66a73-8431-433c-8cd1-d413d726cb0a
value_template: >-
{% if states('sensor.weatheralerts_alert_5') == "on" %}
{{ states.sensor.weatheralerts_alert_5.last_updated }}
@ -1078,6 +1089,7 @@ sensor:
None
{% endif %}
weatheralerts_alert_1_most_recent_active_alert:
unique_id: 569944e9-b4cf-4ed2-9bed-40b2a0a9b898
value_template: >-
{% if states('sensor.weatheralerts_alert_1_most_recent_active_alert') == '' and states('sensor.weatheralerts_alert_1') != 'on' %}
unavailable
@ -1116,6 +1128,7 @@ sensor:
{{ state_attr('sensor.weatheralerts_alert_1_most_recent_active_alert', 'alert_id') }}
{% endif %}
weatheralerts_alert_2_most_recent_active_alert:
unique_id: 8112afda-58b9-4161-809c-9186212f86d7
value_template: >-
{% if states('sensor.weatheralerts_alert_2_most_recent_active_alert') == '' and states('sensor.weatheralerts_alert_2') != 'on' %}
unavailable
@ -1154,6 +1167,7 @@ sensor:
{{ state_attr('sensor.weatheralerts_alert_2_most_recent_active_alert', 'alert_id') }}
{% endif %}
weatheralerts_alert_3_most_recent_active_alert:
unique_id: f71f4ab7-0959-43e9-877a-22084b9642c3
value_template: >-
{% if states('sensor.weatheralerts_alert_3_most_recent_active_alert') == '' and states('sensor.weatheralerts_alert_3') != 'on' %}
unavailable
@ -1192,6 +1206,7 @@ sensor:
{{ state_attr('sensor.weatheralerts_alert_3_most_recent_active_alert', 'alert_id') }}
{% endif %}
weatheralerts_alert_4_most_recent_active_alert:
unique_id: e663e42b-a6b2-4a55-a3d9-1932b10fb0ca
value_template: >-
{% if states('sensor.weatheralerts_alert_4_most_recent_active_alert') == '' and states('sensor.weatheralerts_alert_4') != 'on' %}
unavailable
@ -1230,6 +1245,7 @@ sensor:
{{ state_attr('sensor.weatheralerts_alert_4_most_recent_active_alert', 'alert_id') }}
{% endif %}
weatheralerts_alert_5_most_recent_active_alert:
unique_id: 523d7026-1fdd-4621-91c0-87e0bd98f14d
value_template: >-
{% if states('sensor.weatheralerts_alert_5_most_recent_active_alert') == '' and states('sensor.weatheralerts_alert_5') != 'on' %}
unavailable
@ -1269,6 +1285,7 @@ sensor:
{% endif %}
weatheralerts_alerts_are_active:
friendly_name: Weather Alerts Are Active
unique_id: 3f6ecba1-c102-4324-b56e-6d80ead0c829
icon_template: mdi:alert-rhombus
value_template: >
{% if (states('sensor.weatheralerts') | int > 0) or ((states('sensor.weatheralerts') == 'unavailable') and (states('sensor.weatheralerts_alert_1') == 'on')) %}