diff --git a/automations/alarm/alarm_doorbell.yaml b/automations/alarm/alarm_doorbell.yaml index 0f7fb40d1..19645cd90 100644 --- a/automations/alarm/alarm_doorbell.yaml +++ b/automations/alarm/alarm_doorbell.yaml @@ -32,7 +32,7 @@ continue_on_error: true - variables: - file: "alarm_snapshots/{% from 'file.jinja' import snapshot_filename %}{{ snapshot_filename('front_door') }}" + file: "alarm_snapshots/{% from 'camera.jinja'import snapshot_filename %}{{ snapshot_filename('front_door') }}" - service: camera.snapshot target: diff --git a/automations/alarm/alarm_notifications.yaml b/automations/alarm/alarm_notifications.yaml index 09ed9e879..2db816d49 100644 --- a/automations/alarm/alarm_notifications.yaml +++ b/automations/alarm/alarm_notifications.yaml @@ -144,10 +144,10 @@ - repeat: sequence: - variables: - file1: "alarm_snapshots/{% from 'file.jinja' import snapshot_filename %}{{ snapshot_filename(cam1) }}" - file2: "alarm_snapshots/{% from 'file.jinja' import snapshot_filename %}{{ snapshot_filename(cam2) }}" - file3: "alarm_snapshots/{% from 'file.jinja' import snapshot_filename %}{{ snapshot_filename(cam3) }}" - file4: "alarm_snapshots/{% from 'file.jinja' import snapshot_filename %}{{ snapshot_filename(cam4) }}" + file1: "alarm_snapshots/{% from 'camera.jinja'import snapshot_filename %}{{ snapshot_filename(cam1) }}" + file2: "alarm_snapshots/{% from 'camera.jinja'import snapshot_filename %}{{ snapshot_filename(cam2) }}" + file3: "alarm_snapshots/{% from 'camera.jinja'import snapshot_filename %}{{ snapshot_filename(cam3) }}" + file4: "alarm_snapshots/{% from 'camera.jinja'import snapshot_filename %}{{ snapshot_filename(cam4) }}" - service: camera.snapshot target: @@ -313,7 +313,7 @@ state: "on" sequence: - variables: - file1: "alarm_snapshots/{% from 'file.jinja' import snapshot_filename %}{{ snapshot_filename(cam1) }}" + file1: "alarm_snapshots/{% from 'camera.jinja'import snapshot_filename %}{{ snapshot_filename(cam1) }}" - service: camera.snapshot target: diff --git a/automations/camera/camera_object_detected.yaml b/automations/camera/camera_object_detected.yaml index e7e01c71e..976a29ee9 100644 --- a/automations/camera/camera_object_detected.yaml +++ b/automations/camera/camera_object_detected.yaml @@ -6,7 +6,7 @@ description: "Object detected notification." mode: parallel trace: - stored_traces: 30 #TEST + stored_traces: 30 variables: id: "{{ trigger.payload_json['after']['id'] }}" object: "{{ trigger.payload_json['after']['label'] }}" @@ -18,11 +18,12 @@ - platform: mqtt topic: frigate/events condition: - - condition: template - value_template: "{{ new }}" + - condition: state + entity_id: input_boolean.camera_object_detection + state: "on" - condition: template - value_template: "{{ object in ['person', 'car'] }}" + value_template: "{{ new }}" action: - parallel: - sequence: diff --git a/automations/hass/hass_alert_notification.yaml b/automations/hass/hass_alert_notification.yaml index d3dacda19..3a77a3685 100644 --- a/automations/hass/hass_alert_notification.yaml +++ b/automations/hass/hass_alert_notification.yaml @@ -23,6 +23,7 @@ - group.unknown_devices attribute: entity_id to: + for: 60 # must trigger when alert turns on/off - platform: state diff --git a/automations/notify/notify_alert_announcements.yaml b/automations/notify/notify_alert_announcements.yaml index 400bcf603..c567dd9a9 100644 --- a/automations/notify/notify_alert_announcements.yaml +++ b/automations/notify/notify_alert_announcements.yaml @@ -25,7 +25,7 @@ Attention! The allergy risk alert is now on. The allergy risk for today is {{ states('sensor.allergy_risk_today') }}, and it will be {{ states('sensor.allergy_risk_tomorrow') }} tomorrow. {%- elif t == 'alert.precipitation' %} - {%- from 'speech.jinja' import precipitation_text %} + {%- from 'weather.jinja' import precipitation_text %} Attention! {{- precipitation_text() }} Make sure you get Charlie walked! {%- elif t == 'alert.wind' %} @@ -128,7 +128,7 @@ {%- elif t == 'alert.bathroom_mold_risk' %} Attention! The bathroom mold risk alert is active. {%- elif t == 'alert.door_lock_jammed' %} - {% from 'speech.jinja' import clist_locks %} + {% from 'lock.jinja' import clist_locks %} {%- set locks = states.binary_sensor | selectattr('entity_id', 'contains', '_door_lock_lock_jammed') | selectattr('state', 'eq', 'on') @@ -139,7 +139,7 @@ {%- set plural = 's are' if locks | count > 1 else ' is' -%} Attention! The {{ clist_locks(locks) }} door lock{{ plural }} jammed! {%- elif t == 'alert.door_lock_failed' %} - {%- from 'speech.jinja' import clist_locks %} + {%- from 'lock.jinja' import clist_locks %} {%- set locks = states.binary_sensor | selectattr('entity_id', 'contains', '_door_lock_system_hardware_failure') | selectattr('state', 'eq', 'on') @@ -150,7 +150,7 @@ {%- set plural = 's have' if locks | count > 1 else ' has' -%} Attention! The {{ clist_locks(locks) }} door lock{{ plural }} failed! {%- elif t == 'alert.door_lock_keypad_disabled' %} - {%- from 'speech.jinja' import clist_locks %} + {%- from 'lock.jinja' import clist_locks %} {%- set locks = states.binary_sensor | selectattr('entity_id', 'contains', '_door_lock_keypad_temporary_disabled') | selectattr('state', 'eq', 'on') diff --git a/automations/presence/presence_occupancy_notification.yaml b/automations/presence/presence_occupancy_notification.yaml index ccd985664..ef7dd2f20 100644 --- a/automations/presence/presence_occupancy_notification.yaml +++ b/automations/presence/presence_occupancy_notification.yaml @@ -136,7 +136,7 @@ {%- if zone != 'master' %}, and the {{ other_zone }} alarm is {{ states('sensor.' ~ other_zone ~ '_alarm_status') -}}{%- endif %} . {%- endif %} - {{ 'Personalized occupant automations are disabled in Guest mode.' if states('input_select.occupancy_mode') == 'Guest' }} + {{ 'Personalized occupant automations are disabled.' if states('input_select.occupancy_mode') == 'Guest' }} ignore_away: true save_message: "{{ is_state('binary_sensor.mobile_phone_in_use','on') }}" continue_on_error: true diff --git a/automations/presence/presence_someone_arrives_home.yaml b/automations/presence/presence_someone_arrives_home.yaml index dd9b4df7e..94289f6c5 100644 --- a/automations/presence/presence_someone_arrives_home.yaml +++ b/automations/presence/presence_someone_arrives_home.yaml @@ -21,15 +21,13 @@ - unavailable for: 5 # allow first_home to calculate action: - - if: "{{ first_home }}" - then: - - service: input_select.select_option - target: - entity_id: input_select.occupancy_mode - data: - option: > - {% from 'presence.jinja' import occupancy_mode %} - {{ occupancy_mode() }} + - service: input_select.select_option + target: + entity_id: input_select.occupancy_mode + data: + option: > + {% from 'presence.jinja' import occupancy_mode %} + {{ occupancy_mode() }} - parallel: - sequence: diff --git a/automations/weather/precipitation_alert.yaml b/automations/weather/precipitation_alert.yaml index 88e14ce68..31a47b9bb 100644 --- a/automations/weather/precipitation_alert.yaml +++ b/automations/weather/precipitation_alert.yaml @@ -44,7 +44,7 @@ action: - variables: file: > - {%- from 'file.jinja' import snapshot_filename -%} + {%- from 'camera.jinja'import snapshot_filename -%} weather_snapshots/{{- snapshot_filename('windsor_radar') -}} - service: camera.snapshot @@ -57,7 +57,7 @@ - service: notify.jason data: message: | - {%- from 'speech.jinja' import precipitation_text -%} + {%- from 'weather.jinja' import precipitation_text -%} {{- precipitation_text() -}} data: tag: windsor_radar diff --git a/custom_templates/file.jinja b/custom_templates/camera.jinja similarity index 100% rename from custom_templates/file.jinja rename to custom_templates/camera.jinja diff --git a/custom_templates/door.jinja b/custom_templates/door.jinja new file mode 100644 index 000000000..27e703b0d --- /dev/null +++ b/custom_templates/door.jinja @@ -0,0 +1,18 @@ +{%- macro window_door_sensor(entity_name) -%} +:host { + --paper-item-icon-color: + {%- if is_state('input_boolean.' ~ entity_name, 'on') %} var(--state-icon-color) + {%- else %} var(--entity-minor-color) + {%- endif -%} + ; + --state-binary_sensor-active-color: + {%- set sensor = 'binary_sensor.' ~ entity_name ~ '_open_alert' %} + {%- set trigger = state_attr('alarm_control_panel.master', 'open_sensors') if state_attr('alarm_control_panel.master', 'open_sensors') else '' %} + {%- if is_state('input_boolean.alarm_triggered', 'on') and sensor in trigger %} var(--entity-critical-color) + {%- elif is_state(sensor, 'on') and not is_state('alert.hvac_window_door_open', 'idle') %} var(--entity-severe-color) + {%- elif is_state('input_boolean.' ~ entity_name, 'off') %} var(--state-warning-color) + {%- else %} var(--state-active-color) + {%- endif -%} + ; +} +{%- endmacro -%} \ No newline at end of file diff --git a/custom_templates/light.jinja b/custom_templates/light.jinja index 3123b6298..8f414f6e7 100644 --- a/custom_templates/light.jinja +++ b/custom_templates/light.jinja @@ -15,6 +15,20 @@ {{- timer if has_value(timer) else none -}} {%- endmacro -%} +{%- macro light_switch(entity, switch) -%} +.primary { + color: + {%- set manual = state_attr(switch, 'manual_control') %} + {%- if manual != none %} + {%- if entity in manual %} var(--entity-warning-color) + {%- else %} var(--primary-text-color) + {%- endif %} + {%- else %} var(--primary-text-color) + {%- endif -%} + !important; +} +{%- endmacro -%} + {%- macro adaptive_switch(light) -%} {%- if state_attr(light, 'rgb_light') == 'slave' %} {%- set light = state_attr(light, 'master') %} @@ -35,4 +49,16 @@ {%- endif %} {{- light in state_attr(switch, 'manual_control') if switch != none and state_attr(switch, 'manual_control') != none else false -}} +{%- endmacro -%} + +{%- macro scene_rgb_state(scene) -%} +rgb({{ states('input_number.rgb_red_' ~ scene) | int }}, +{{- states('input_number.rgb_green_' ~ scene) | int }}, +{{- states('input_number.rgb_blue_' ~ scene) | int }}) +{%- endmacro -%} + +{%- macro scene_rgb_attribute(scene) -%} +[{{ states('input_number.rgb_red_' ~ scene) | int }}, +{{- states('input_number.rgb_green_' ~ scene) | int }}, +{{- states('input_number.rgb_blue_' ~ scene) | int }}] {%- endmacro -%} \ No newline at end of file diff --git a/custom_templates/lock.jinja b/custom_templates/lock.jinja new file mode 100644 index 000000000..f162c6ab6 --- /dev/null +++ b/custom_templates/lock.jinja @@ -0,0 +1,12 @@ +{%- macro clist_locks(locks) -%} +{%- set msg = namespace(value='') %} +{%- set qty = namespace(value=0) %} +{%- for item in locks %} + {%- set qty.value = qty.value | int(0) + 1 %} + {%- if not loop.first %}{% set msg.value = msg.value ~ ', ' %}{% endif %} + {%- set msg.value = msg.value ~ states[item].object_id | replace('_door_lock', '') | replace('_', ' ') | title %} +{%- endfor %} +{%- set clist = ', and ' if msg.value.split(', ') | count > 2 else ' and ' %} +{%- set plural = 's have' if qty.value | int(0) > 1 else ' has' %} +{{- clist.join(msg.value.rsplit(', ', 1)) -}} +{%- endmacro -%} diff --git a/custom_templates/rgb.jinja b/custom_templates/rgb.jinja deleted file mode 100644 index 42d8865bd..000000000 --- a/custom_templates/rgb.jinja +++ /dev/null @@ -1,11 +0,0 @@ -{%- macro scene_rgb_state(scene) -%} -rgb({{ states('input_number.rgb_red_' ~ scene) | int }}, -{{- states('input_number.rgb_green_' ~ scene) | int }}, -{{- states('input_number.rgb_blue_' ~ scene) | int }}) -{%- endmacro -%} - -{%- macro scene_rgb_attribute(scene) -%} -[{{ states('input_number.rgb_red_' ~ scene) | int }}, -{{- states('input_number.rgb_green_' ~ scene) | int }}, -{{- states('input_number.rgb_blue_' ~ scene) | int }}] -{%- endmacro -%} \ No newline at end of file diff --git a/custom_templates/schedule.jinja b/custom_templates/schedule.jinja new file mode 100644 index 000000000..90c4fe158 --- /dev/null +++ b/custom_templates/schedule.jinja @@ -0,0 +1,12 @@ +{%- macro list_events(events) -%} +{%- for event in events %} + {%- if (event.start is defined) %} + {%- if (event.start | as_datetime).day == now().day %} + {{ event.start | as_timestamp | timestamp_custom('Today at %-I:%M %p') }}: {% if event.summary is defined %}{{ event.summary }}{% endif %} + {%- else %} + {{ event.start | as_timestamp | timestamp_custom('%A at %-I:%M %p') }}: {% if event.summary is defined %}{{ event.summary }}{% endif %} + {%- endif %} + {%- else %}{% if event.summary is defined %}{{ event.summary }}{% endif %} + {%- endif %} +{%- endfor %}. +{%- endmacro -%} diff --git a/custom_templates/speech.jinja b/custom_templates/speech.jinja index c35d0abed..e3489456c 100644 --- a/custom_templates/speech.jinja +++ b/custom_templates/speech.jinja @@ -1,37 +1,3 @@ -{%- macro precipitation_text() -%} -{%- from 'speech.jinja' import plural_qty -%} -{%- from 'speech.jinja' import full_cardinal_direction -%} -{%- set current = states('sensor.precipitation_type') | lower %} -{%- set type = state_attr('sensor.precipitation_start', 'type') | lower %} -{%- set time = state_attr('sensor.precipitation_start', '12hour') %} -{%- set dist = states('sensor.nearest_storm_distance') | int(-1) %} -{%- set dir = full_cardinal_direction(states('sensor.nearest_storm_bearing') | int(-1)) %} -{%- if is_state('binary_sensor.precipitation_active','on') %} -It is {{ current }}ing right now. -{%- elif time != none %} -Possibility of {{ type }} around {{ time }}. -{%- if dist > 0 %} -The storm is {{ iif(dist > 0, - plural_qty('kilometer', dist, false) ~ ' away', ' in the immediate vicinity') }} - {{- iif(dir != 'unknown', ' approaching from the ' ~ dir, '') }}. -{%- endif %} -{%- endif -%} -{%- endmacro -%} - -{%- macro list_events(events) -%} -{%- for event in events %} - {%- if (event.start is defined) %} - {%- if (event.start | as_datetime).day == now().day %} - {{ event.start | as_timestamp | timestamp_custom('Today at %-I:%M %p') }}: {% if event.summary is defined %}{{ event.summary }}{% endif %} - {%- else %} - {{ event.start | as_timestamp | timestamp_custom('%A at %-I:%M %p') }}: {% if event.summary is defined %}{{ event.summary }}{% endif %} - {%- endif %} - {%- else %}{% if event.summary is defined %}{{ event.summary }}{% endif %} - {%- endif %} - {%- if event.description is defined %} - {{ event.description }}{% endif %} -{%- endfor %}. -{%- endmacro -%} - {%- macro twelve_hour(entity) -%} {{- states(entity) | as_timestamp(none) | timestamp_custom('%-I:%M %p', true, none) -}} {%- endmacro -%} diff --git a/custom_templates/style.jinja b/custom_templates/style.jinja index 0ad985944..868c15f74 100644 --- a/custom_templates/style.jinja +++ b/custom_templates/style.jinja @@ -1,6 +1,6 @@ {%- macro alert_switch(entity) -%} {%- set active_alert = states.alert | selectattr('attributes.category', 'eq', states[entity].object_id[:-7]) - | selectattr('state', 'ne', 'idle') | list | count > 0 -%} + | selectattr('state', 'ne', 'idle') | list | count > 0 if states[entity] != none else false -%} :host { --paper-item-icon-color: {%- if active_alert %} var(--entity-severe-color) @@ -18,39 +18,6 @@ } {%- endmacro -%} -{%- macro window_door_sensor(entity_name) -%} -:host { - --paper-item-icon-color: - {%- if is_state('input_boolean.' ~ entity_name, 'on') %} var(--state-icon-color) - {%- else %} var(--entity-minor-color) - {%- endif -%} - ; - --state-binary_sensor-active-color: - {%- set sensor = 'binary_sensor.' ~ entity_name ~ '_open_alert' %} - {%- set trigger = state_attr('alarm_control_panel.master', 'open_sensors') if state_attr('alarm_control_panel.master', 'open_sensors') else '' %} - {%- if is_state('input_boolean.alarm_triggered', 'on') and sensor in trigger %} var(--entity-critical-color) - {%- elif is_state(sensor, 'on') and not is_state('alert.hvac_window_door_open', 'idle') %} var(--entity-severe-color) - {%- elif is_state('input_boolean.' ~ entity_name, 'off') %} var(--state-warning-color) - {%- else %} var(--state-active-color) - {%- endif -%} - ; -} -{%- endmacro -%} - -{%- macro light_switch(entity, switch) -%} -.primary { - color: - {%- set manual = state_attr(switch, 'manual_control') %} - {%- if manual != none %} - {%- if entity in manual %} var(--entity-warning-color) - {%- else %} var(--primary-text-color) - {%- endif %} - {%- else %} var(--primary-text-color) - {%- endif -%} - !important; -} -{%- endmacro -%} - {%- macro popup_style() -%} div.mdc-dialog__scrim { backdrop-filter: grayscale(100%) brightness(25%) !important; diff --git a/custom_templates/weather.jinja b/custom_templates/weather.jinja index 267534714..325f9b6d3 100644 --- a/custom_templates/weather.jinja +++ b/custom_templates/weather.jinja @@ -1,3 +1,23 @@ +{%- macro precipitation_text() -%} +{%- from 'speech.jinja' import plural_qty -%} +{%- from 'speech.jinja' import full_cardinal_direction -%} +{%- set current = states('sensor.precipitation_type') | lower %} +{%- set type = state_attr('sensor.precipitation_start', 'type') | lower %} +{%- set time = state_attr('sensor.precipitation_start', '12hour') %} +{%- set dist = states('sensor.nearest_storm_distance') | int(-1) %} +{%- set dir = full_cardinal_direction(states('sensor.nearest_storm_bearing') | int(-1)) %} +{%- if is_state('binary_sensor.precipitation_active','on') %} +It is {{ current }}ing right now. +{%- elif time != none %} +Possibility of {{ type }} around {{ time }}. +{%- if dist > 0 %} +The storm is {{ iif(dist > 0, + plural_qty('kilometer', dist, false) ~ ' away', ' in the immediate vicinity') }} + {{- iif(dir != 'unknown', ' approaching from the ' ~ dir, '') }}. +{%- endif %} +{%- endif -%} +{%- endmacro -%} + {%- macro fire_risk(index) -%} {%- if is_number(index) and index > 0 %} {%- if index >= 30 %} Extreme @@ -94,11 +114,40 @@ {%- macro aqi_index_icon(index) -%} :host { --paper-item-icon-color: - {%- if index >= 301 %} var(--entity-critical-color) - {%- elif index >=201 %} var(--entity-severe-color) - {%- elif index >= 101 %} var(--entity-warning-color) - {%- elif index >= 50 %} var(--entity-minor-color) - {%- elif index >= 0 %} var(--state-icon-color) + {%- if is_number(index) %} + {%- if index >= 301 %} var(--entity-critical-color) + {%- elif index >=201 %} var(--entity-severe-color) + {%- elif index >= 101 %} var(--entity-warning-color) + {%- elif index >= 50 %} var(--entity-minor-color) + {%- elif index >= 0 %} var(--state-icon-color) + {%- else %} var(--entity-disabled-color) + {%- endif -%} + {%- else %} unknown + {%- endif -%} + ; +} +{%- endmacro -%} + +{%- macro smoke_risk(index) -%} +{%- if is_number(index) and index >= 0 %} + {%- if index >= 250 %} Extreme + {%- elif index >= 120 %} Very High + {%- elif index >= 60 %} High + {%- elif index >= 10 %} Moderate + {%- else %} Low + {%- endif -%} +{%- else %} unknown +{%- endif -%} +{%- endmacro -%} + +{%- macro smoke_risk_icon(risk) -%} +:host { + --paper-item-icon-color: + {%- if risk == 'Extreme' %} var(--entity-critical-color) + {%- elif risk == 'Very High' %} var(--entity-severe-color) + {%- elif risk == 'High' %} var(--entity-warning-color) + {%- elif risk == 'Moderate' %} var(--entity-minor-color) + {%- elif risk == 'Low' %} var(--state-icon-color) {%- else %} var(--entity-disabled-color) {%- endif -%} ; diff --git a/logging/logger.yaml b/logging/logger.yaml index 4a295243c..89635caca 100644 --- a/logging/logger.yaml +++ b/logging/logger.yaml @@ -24,8 +24,6 @@ filters: # - "Error communicating with socket, resetting connection" #WARNING (Thread-9) [pychromecast.socket_client] [Bedroom Hub(192.168.1.194):8009] Error communicating with socket, resetting connection homeassistant.components.roku.coordinator: - "Error fetching roku data" #ERROR (MainThread) [homeassistant.components.roku.coordinator] Error fetching roku data: Invalid response from API: Timeout occurred while connecting to device - # homeassistant.helpers.entity: - # - "is taking over 10 seconds" #WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.wan is taking over 10 seconds homeassistant.components.mold_indicator.sensor: # triggered when templates are reloaded - "Unable to parse temperature sensor sensor.outdoor_temperature with state: unavailable" #ERROR (MainThread) [homeassistant.components.mold_indicator.sensor] Unable to parse temperature sensor sensor.outdoor_temperature with state: unavailable homeassistant.components.glances.coordinator: #ISSUE occurs regularly @@ -42,7 +40,7 @@ filters: custom_components.nest_protect.pynest: #TEMP until fix - "Authentication error: invalid_request" #ERROR (MainThread) [custom_components.nest_protect.pynest] Authentication error: invalid_request - "Could not interpret Nest response" #ERROR (MainThread) [custom_components.nest_protect.pynest] Could not interpret Nest response - homeassistant.components.websocket_api.http.connection: #TEMP until fixed + homeassistant.components.websocket_api.http.connection: #ISSUE #TEMP until fixed https://github.com/decompil3d/lovelace-hourly-weather/issues/677 - "sensor.hourly_weather" #ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [281470327813568] Error handling message: Entity ID 'sensor.hourly_weather' does not belong to domain 'weather' for dictionary value @ data['entity_id']. Got 'sensor.hourly_weather' (invalid_format) Jason from 192.168.1.250 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36) homeassistant.util.logging: - "Exception in state_message_received when handling msg on 'wyzebridge" #ERROR (MainThread) [homeassistant.util.logging] Exception in state_message_received when handling msg on 'wyzebridge/charlie-crate/alarm': '0' diff --git a/packages/camera.yaml b/packages/camera.yaml index e0b608a1c..cfad7fe8d 100644 --- a/packages/camera.yaml +++ b/packages/camera.yaml @@ -141,6 +141,8 @@ homeassistant: away: false input_boolean: + camera_object_detection: + name: "Camera Object Detection" object_tts_announcements: name: "Object TTS Announcements" object_mobile_notifications: diff --git a/packages/scene/chill_scene.yaml b/packages/scene/chill_scene.yaml index bdd413ffd..9e252266d 100644 --- a/packages/scene/chill_scene.yaml +++ b/packages/scene/chill_scene.yaml @@ -44,11 +44,11 @@ template: unique_id: rgb_chill_scene icon: mdi:lightbulb state: > - {%- from 'rgb.jinja' import scene_rgb_state %} + {%- from 'light.jinja'import scene_rgb_state %} {{- scene_rgb_state('chill') -}} attributes: rgb_color: > - {%- from 'rgb.jinja' import scene_rgb_attribute %} + {%- from 'light.jinja'import scene_rgb_attribute %} {{- scene_rgb_attribute('chill') -}} switch: diff --git a/packages/scene/company_scene.yaml b/packages/scene/company_scene.yaml index c61d16820..7f8b854bb 100644 --- a/packages/scene/company_scene.yaml +++ b/packages/scene/company_scene.yaml @@ -47,11 +47,11 @@ template: unique_id: rgb_company_scene icon: mdi:lightbulb state: > - {% from 'rgb.jinja' import scene_rgb_state %} + {% from 'light.jinja'import scene_rgb_state %} {{ scene_rgb_state('company') }} attributes: rgb_color: > - {% from 'rgb.jinja' import scene_rgb_attribute %} + {% from 'light.jinja'import scene_rgb_attribute %} {{ scene_rgb_attribute('company') }} switch: diff --git a/packages/scene/movie_scene.yaml b/packages/scene/movie_scene.yaml index d8f775e68..912ec93d2 100644 --- a/packages/scene/movie_scene.yaml +++ b/packages/scene/movie_scene.yaml @@ -47,11 +47,11 @@ template: unique_id: rgb_movie_scene icon: mdi:lightbulb state: > - {% from 'rgb.jinja' import scene_rgb_state %} + {% from 'light.jinja'import scene_rgb_state %} {{ scene_rgb_state('movie') }} attributes: rgb_color: > - {% from 'rgb.jinja' import scene_rgb_attribute %} + {% from 'light.jinja'import scene_rgb_attribute %} {{ scene_rgb_attribute('movie') }} switch: diff --git a/packages/weather/waqi.yaml b/packages/weather/waqi.yaml deleted file mode 100644 index 1f4dc0b89..000000000 --- a/packages/weather/waqi.yaml +++ /dev/null @@ -1,47 +0,0 @@ -############################################################################### -## Package - Air Quality -############################################################################### -homeassistant: - customize: - alert.air_quality: - icon: mdi:smog - category: weather - alert.waqi_connected: - entity_picture: !secret WAQI_ICON - category: weather - sensor.waqi_windsor: - icon: mdi:smog - -alert: - air_quality: - name: "Air Quality" - title: "Air Quality Alert" - message: "Air Quality Risk Level: {{ states('sensor.aqi_risk_level') }}" - done_message: clear_notification - entity_id: binary_sensor.air_quality_alert - state: "on" - repeat: 86400 - notifiers: jason - data: - tag: air_quality - group: Weather - visibility: public - notification_icon: mdi:smog - icon_url: !secret AQI_ICON - ledColor: !secret MINOR_COLOR - color: !secret MINOR_COLOR - vibrationPattern: !secret ALERT_VIBRATION - clickAction: /ui/mobile/air-quality - actions: - - title: "Pause" - action: pause_alert_air_quality - - waqi_connected: - name: "WAQI Connected" - entity_id: binary_sensor.waqi_connected_alert - state: "on" - notifiers: log - skip_first: false - repeat: 999999 - data: - tag: waqi_connected diff --git a/packages/weather/weather.yaml b/packages/weather/weather.yaml index 2e0cd0f26..b3e5755e7 100644 --- a/packages/weather/weather.yaml +++ b/packages/weather/weather.yaml @@ -19,6 +19,15 @@ homeassistant: icon: mdi:weather-sunny-alert category: weather + alert.air_quality: + icon: mdi:smog + category: weather + alert.waqi_connected: + entity_picture: !secret WAQI_ICON + category: weather + sensor.waqi_windsor: + icon: mdi:smog + weather: - platform: template name: "Home Daily" @@ -272,6 +281,41 @@ alert: - title: "Pause" action: pause_alert_wind + air_quality: + name: "Air Quality" + title: "Air Quality Alert" + message: > + Air Quality Risk: {{ states('sensor.aqi_risk_level') }} + Smoke Risk: {{ states('sensor.smoke_risk') }} + done_message: clear_notification + entity_id: binary_sensor.air_quality_alert + state: "on" + repeat: 86400 + notifiers: jason + data: + tag: air_quality + group: Weather + visibility: public + notification_icon: mdi:smog + icon_url: !secret AQI_ICON + ledColor: !secret MINOR_COLOR + color: !secret MINOR_COLOR + vibrationPattern: !secret ALERT_VIBRATION + clickAction: /ui/mobile/air-quality + actions: + - title: "Pause" + action: pause_alert_air_quality + + waqi_connected: + name: "WAQI Connected" + entity_id: binary_sensor.waqi_connected_alert + state: "on" + notifiers: log + skip_first: false + repeat: 999999 + data: + tag: waqi_connected + precipitation: name: "Precipitation" entity_id: binary_sensor.precipitation_alert diff --git a/scripts/alarm/arm_alarm.yaml b/scripts/alarm/arm_alarm.yaml index 1bd119c15..dd27ef149 100644 --- a/scripts/alarm/arm_alarm.yaml +++ b/scripts/alarm/arm_alarm.yaml @@ -122,7 +122,7 @@ arm_alarm: skip_delay: "{{ skip_delay }}" else: - variables: #TEMP side_door until garage_inside replaced - file: "alarm_snapshots/{% from 'file.jinja' import snapshot_filename %}{{ snapshot_filename('side_door') }}" + file: "alarm_snapshots/{% from 'camera.jinja'import snapshot_filename %}{{ snapshot_filename('side_door') }}" # create camera snapshots - service: camera.snapshot @@ -194,7 +194,7 @@ arm_alarm: timeout: 30 - variables: - file: "alarm_snapshots/{% from 'file.jinja' import snapshot_filename %}{{ snapshot_filename('kiosk') }}" + file: "alarm_snapshots/{% from 'camera.jinja'import snapshot_filename %}{{ snapshot_filename('kiosk') }}" # create camera snapshots - service: camera.snapshot diff --git a/scripts/lock/reset_failed_locks.yaml b/scripts/lock/reset_failed_locks.yaml index 2d51b5313..61029c18a 100644 --- a/scripts/lock/reset_failed_locks.yaml +++ b/scripts/lock/reset_failed_locks.yaml @@ -51,7 +51,7 @@ reset_failed_locks: - service: script.tts_play data: message: | - {%- from 'speech.jinja' import clist_locks -%} + {%- from 'lock.jinja' import clist_locks -%} {%- set plural = 's have' if locks | count > 1 else ' has' -%} The {{ clist_locks(locks) }} door lock hardware failure{{ plural }} not been cleared! quiet_play: true diff --git a/scripts/lock/reset_intrusion_locks.yaml b/scripts/lock/reset_intrusion_locks.yaml index aab5dea90..ea505dab4 100644 --- a/scripts/lock/reset_intrusion_locks.yaml +++ b/scripts/lock/reset_intrusion_locks.yaml @@ -50,7 +50,7 @@ reset_intrusion_locks: - service: script.tts_play data: message: | - {%- from 'speech.jinja' import clist_locks -%} + {%- from 'lock.jinja' import clist_locks -%} {%- set plural = 's have' if locks | count > 1 else ' has' -%} The {{ clist_locks(locks) }} door lock intrusion alerts{{ plural }} not been cleared! quiet_play: true diff --git a/scripts/lock/reset_jammed_locks.yaml b/scripts/lock/reset_jammed_locks.yaml index cd966f6c0..9fd175dff 100644 --- a/scripts/lock/reset_jammed_locks.yaml +++ b/scripts/lock/reset_jammed_locks.yaml @@ -56,7 +56,7 @@ reset_jammed_locks: - service: script.tts_play data: message: | - {%- from 'speech.jinja' import clist_locks -%} + {%- from 'lock.jinja' import clist_locks -%} {%- set plural = 's have' if locks | count > 1 else ' has' -%} The {{ clist_locks(locks) }} door lock jam{{ plural }} not been cleared! alert: true diff --git a/scripts/lock/reset_keypad_disabled_locks.yaml b/scripts/lock/reset_keypad_disabled_locks.yaml index 1f109668f..9ec2b5a5d 100644 --- a/scripts/lock/reset_keypad_disabled_locks.yaml +++ b/scripts/lock/reset_keypad_disabled_locks.yaml @@ -50,7 +50,7 @@ reset_keypad_disabled_locks: - service: script.tts_play data: message: | - {%- from 'speech.jinja' import clist_locks -%} + {%- from 'lock.jinja' import clist_locks -%} {%- set plural = 's have' if locks | count > 1 else ' has' -%} The {{ clist_locks(locks) }} door lock keyboard disabled{{ plural }} not been cleared! alert: true diff --git a/scripts/schedule/bedtime.yaml b/scripts/schedule/bedtime.yaml index c9f728522..7b03a8e84 100644 --- a/scripts/schedule/bedtime.yaml +++ b/scripts/schedule/bedtime.yaml @@ -68,7 +68,7 @@ bedtime: quiet_play: true save_message: "{{ is_state('binary_sensor.mobile_phone_in_use','on') }}" message: | - {%- from 'speech.jinja' import list_events %} + {%- from 'schedule.jinja' import list_events %} {%- from 'speech.jinja' import iarticle %} {%- from 'speech.jinja' import plural_qty %} {%- set wake_time = states('sensor.next_waketime') | as_datetime %} diff --git a/templates/schedule/calendar.yaml b/templates/schedule/calendar.yaml index 4302eb9bf..51ecf6c77 100644 --- a/templates/schedule/calendar.yaml +++ b/templates/schedule/calendar.yaml @@ -41,7 +41,7 @@ - variables: events: "{{ agenda['calendar.jazzyisj']['events'] }}" message: | - {%- from 'speech.jinja' import list_events %} + {%- from 'schedule.jinja' import list_events %} Good {{ states('sensor.tod_greeting') }}! {%- if events | count > 0 %} Here are your upcoming calendar events. @@ -83,7 +83,7 @@ state: "{{ events | count }}" attributes: events: > - {%- from 'speech.jinja' import list_events %} + {%- from 'schedule.jinja' import list_events %} {%- if events | count > 0 %} {{ list_events(events) }} {%- endif -%} diff --git a/templates/weather/waqi.yaml b/templates/weather/waqi.yaml deleted file mode 100644 index 8e8fe082c..000000000 --- a/templates/weather/waqi.yaml +++ /dev/null @@ -1,35 +0,0 @@ -############################################################################### -## Templates - Air Quality -############################################################################### -- trigger: - - platform: homeassistant - event: start - - - platform: event - event_type: event_template_reloaded - - - platform: time_pattern - minutes: "/1" - binary_sensor: - - name: "WAQI Connected" - unique_id: waqi_connected - picture: !secret WAQI_ICON - device_class: connectivity - state: "{{ integration_entities('waqi') | select('has_value') | list | count > 0 }}" - -- binary_sensor: - - name: "WAQI Connected Alert" - unique_id: waqi_connected_alert - device_class: problem - delay_on: 300 - state: > - {{ is_state('binary_sensor.waqi_connected', 'off') - and is_state('input_boolean.weather_alerts', 'on') }} - - - name: "Air Quality Alert" - unique_id: air_quality_alert - icon: mdi:smog - state: > - {{ is_state('sensor.aqi_risk_level', ['Very Unhealthy', 'Unhealthy', 'Unhealthy Sensitive Groups']) - and is_state('input_boolean.weather_alerts', 'on') }} - availability: "{{ has_value('sensor.aqi_risk_level') }}" diff --git a/templates/weather/weather.yaml b/templates/weather/weather.yaml index a2c96292b..1005a4268 100644 --- a/templates/weather/weather.yaml +++ b/templates/weather/weather.yaml @@ -1,6 +1,7 @@ ############################################################################### ## Templates - Weather ############################################################################### + - trigger: - platform: homeassistant event: start @@ -85,6 +86,7 @@ {% endif %} {% endif %} + # use pirateweather, weatherflow first, no precipitation in envcan - name: "Hourly Weather" unique_id: hourly_weather state: "{{ states('sensor.current_condition') }}" @@ -104,7 +106,6 @@ visibility_unit: "{{ state_attr('sensor.visibility', 'unit_of_measurement') }}" precipitation: "{{ states('sensor.precipitation_accumulated_today') }}" precipitation_unit: "{{ state_attr('sensor.precipitation_accumulated_today', 'unit_of_measurement') }}" - # use pirateweather, weatherflow first, no precipitation in envcan forecast: > {% if hourly is defined %} {% if hourly['weather.pirateweather'] is defined @@ -119,7 +120,43 @@ {% endif %} {% endif %} +############################################################################### +## Integrations +############################################################################### + +- trigger: + - platform: homeassistant + event: start + + - platform: event + event_type: event_template_reloaded + + - platform: time_pattern + minutes: "/1" + binary_sensor: + - name: "WAQI Connected" + unique_id: waqi_connected + picture: !secret WAQI_ICON + device_class: connectivity + state: "{{ integration_entities('waqi') | select('has_value') | list | count > 0 }}" + - binary_sensor: + ############################################################################### + ## Integrations + ############################################################################### + + - name: "WAQI Connected Alert" + unique_id: waqi_connected_alert + device_class: problem + delay_on: 300 + state: > + {{ is_state('binary_sensor.waqi_connected', 'off') + and is_state('input_boolean.weather_alerts', 'on') }} + + ############################################################################### + ## Temperature + ############################################################################### + - name: "Outdoor High Temperature Alert" unique_id: outdoor_high_temperature_alert # prevent multiple alerts when temp hovering around threshold @@ -163,6 +200,10 @@ state: "{{ states('sensor.outdoor_temperature') | int <= 0 }}" availability: "{{ is_number(states('sensor.outdoor_temperature')) }}" + ############################################################################### + ## Precipitaiton + ############################################################################### + - name: "Precipitation Active" unique_id: precipitation_active icon: mdi:weather-pouring @@ -200,6 +241,10 @@ or is_state('binary_sensor.precipitation_likely_soon', 'on')) and is_state('input_boolean.weather_alerts','on') }} + ############################################################################### + ## Storm & Lightning + ############################################################################### + - name: "Lightning" unique_id: lightning icon: mdi:weather-lightning @@ -220,6 +265,10 @@ and states('sensor.lightning_distance') | int < 5 and states('sensor.lightning_count') | int > 0 }} + ############################################################################### + ## Wind + ############################################################################### + - name: "Wind Alert" unique_id: wind_alert icon: mdi:weather-windy @@ -246,7 +295,25 @@ or is_state('binary_sensor.outdoor_low_temperature_alert', 'on') or is_state('binary_sensor.outdoor_high_temperature_alert', 'on') or is_state('alert.precipitation', 'on') }} + + ############################################################################### + ## Air Quality + ############################################################################### + + - name: "Air Quality Alert" + unique_id: air_quality_alert + icon: mdi:smog + state: > + {{ (is_state('sensor.aqi_risk_level', ['Very Unhealthy', 'Unhealthy', 'Unhealthy Sensitive Groups']) + or is_state('sensor.smoke_risk', ['Extreme', 'Very High', 'High',' Moderate']) + or is_state('sensor.smoke_risk_today', ['critical', 'severe', 'warning'])) + and is_state('input_boolean.weather_alerts', 'on') }} + - sensor: + ############################################################################### + ## Condition + ############################################################################### + #IDEA add icons for envcan extra values - req custom weather card - name: "Current Condition" unique_id: current_condition @@ -305,6 +372,10 @@ and state_attr('sensor.daily_weather', 'forecast')[1] is defined and state_attr('sensor.daily_weather', 'forecast')[1].condition is defined }} + ############################################################################### + ## Temperature + ############################################################################### + - name: "Outdoor Temperature" unique_id: outdoor_temperature device_class: temperature @@ -504,6 +575,10 @@ and is_number(states('sensor.windsor_normal_low_temperature')) and is_number(states('sensor.outdoor_low_temperature')) }} + ############################################################################### + ## Humidity + ############################################################################### + - name: "Outdoor Humidity" unique_id: outdoor_humidity device_class: humidity @@ -560,6 +635,10 @@ and state_attr('sensor.daily_weather', 'forecast')[0].humidity is defined and is_number(state_attr('sensor.daily_weather', 'forecast')[0].humidity) }} + ############################################################################### + ## Dew Point + ############################################################################### + - name: "Dew Point" unique_id: dew_point icon: mdi:thermometer-water @@ -623,6 +702,10 @@ {% endif %} availability: "{{ is_number(states('sensor.dew_point')) }}" + ############################################################################### + ## Precipitation + ############################################################################### + - name: "Precipitation Probability" unique_id: precipitation_probability icon: mdi:weather-rainy @@ -964,6 +1047,35 @@ or state_attr('sensor.weather_forecasts', 'weatherflow_hourly') != none or state_attr('sensor.weather_forecasts', 'pirate_hourly') != none }} + ############################################################################### + ## Storm & Lightning + ############################################################################### + + - name: "Nearest Storm Bearing" + unique_id: nearest_storm_bearing + state: "{{ states('sensor.pirateweather_nearest_storm_bearing') }}" + state_class: measurement + unit_of_measurement: "°" + + - name: "Nearest Storm Direction" + unique_id: nearest_storm_direction + icon: mdi:compass + state: > + {% from 'speech.jinja' import full_cardinal_direction %} + {{ full_cardinal_direction(states('sensor.nearest_storm_bearing') | int(-1)) }} + + - name: "Nearest Storm Distance" + unique_id: nearest_storm_distance + device_class: distance + state_class: measurement + unit_of_measurement: km + state: "{{ states('sensor.pirateweather_nearest_storm_distance') | int }}" + attributes: + provider: Pirate Weather + availability: > + {{ is_state('binary_sensor.pirateweather_connected', 'on') + and is_number(states('sensor.pirateweather_nearest_storm_distance')) }} + - name: "Lightning Count" unique_id: lightning_count icon: mdi:lightning-bolt @@ -1043,45 +1155,9 @@ state: "{{ states('sensor.home_sensors_time_of_last_lightning_strike') }}" availability: "{{ has_value('sensor.home_sensors_time_of_last_lightning_strike') }}" - - name: "Nearest Storm Bearing" - unique_id: nearest_storm_bearing - state: "{{ states('sensor.pirateweather_nearest_storm_bearing') }}" - state_class: measurement - unit_of_measurement: "°" - - - name: "Nearest Storm Direction" - unique_id: nearest_storm_direction - icon: mdi:compass - state: > - {% from 'speech.jinja' import full_cardinal_direction %} - {{ full_cardinal_direction(states('sensor.nearest_storm_bearing') | int(-1)) }} - - - name: "Nearest Storm Distance" - unique_id: nearest_storm_distance - device_class: distance - state_class: measurement - unit_of_measurement: km - state: "{{ states('sensor.pirateweather_nearest_storm_distance') | int }}" - attributes: - provider: Pirate Weather - availability: > - {{ is_state('binary_sensor.pirateweather_connected', 'on') - and is_number(states('sensor.pirateweather_nearest_storm_distance')) }} - - - name: "Pressure Trend" - unique_id: pressure_trend - icon: > - {% if is_state(this.entity_id, 'Rising') %} mdi:trending-up - {% elif is_state(this.entity_id, 'Falling') %} mdi:trending-down - {% else %} mdi:thermometer-lines - {% endif %} - state: > - {% set change = states('sensor.pressure_change') | float %} - {% if change >= 1 %} Rising - {% elif change < -1 %} Falling - {% else %} Steady - {% endif %} - availability: "{{ is_number(states('sensor.pressure_change')) }}" + ############################################################################### + ## Barometric Pressure + ############################################################################### - name: "Barometric Pressure" unique_id: barometric_pressure @@ -1140,6 +1216,25 @@ {% endif %} availability: "{{ is_number(states('sensor.barometric_pressure')) }}" + - name: "Pressure Trend" + unique_id: pressure_trend + icon: > + {% if is_state(this.entity_id, 'Rising') %} mdi:trending-up + {% elif is_state(this.entity_id, 'Falling') %} mdi:trending-down + {% else %} mdi:thermometer-lines + {% endif %} + state: > + {% set change = states('sensor.pressure_change') | float %} + {% if change >= 1 %} Rising + {% elif change < -1 %} Falling + {% else %} Steady + {% endif %} + availability: "{{ is_number(states('sensor.pressure_change')) }}" + + ############################################################################### + ## Wind Conditions + ############################################################################### + # pirate, envcan priority - more accurate - name: "Wind Speed" unique_id: wind_speed @@ -1368,6 +1463,10 @@ {% else %} Hurricane {% endif %} + ############################################################################### + ## Cloud Coverage + ############################################################################### + - name: "Cloud Coverage" unique_id: cloud_coverage icon: mdi:cloud @@ -1404,6 +1503,10 @@ and state_attr('sensor.daily_weather', 'forecast')[0].cloud_coverage is defined and is_number(state_attr('sensor.daily_weather', 'forecast')[0].cloud_coverage) }} + ############################################################################### + ## Visibility + ############################################################################### + - name: "Visibility" unique_id: visibility icon: mdi:eye @@ -1449,12 +1552,9 @@ or (is_state('binary_sensor.pirateweather_connected', 'on') and is_number(states('sensor.pirateweather_visibility'))) }} - - name: "Atmospheric Smoke" - unique_id: atmospheric_smoke - icon: mdi:smoke - state_class: measurement - state: "{{ states('sensor.pirateweather_smoke') | int }}" - availability: "{{ is_number(states('sensor.pirateweather_smoke')) }}" + ############################################################################### + ## Fire Index + ############################################################################### - name: "Fire Index" unique_id: fire_index @@ -1487,6 +1587,10 @@ {{ fire_risk(states('sensor.pirateweather_fire_index_max_1d') | int ) }} availability: "{{ is_number(states('sensor.pirateweather_fire_index_max_1d')) }}" + ############################################################################### + ## UV Risk + ############################################################################### + - name: "UV Index" unique_id: uv_index icon: mdi:weather-sunny @@ -1517,6 +1621,10 @@ {{ uv_risk(states('sensor.max_uv_index') | int) }} availability: "{{ is_number(states('sensor.max_uv_index')) }}" + ############################################################################### + ## Air Quality + ############################################################################### + - name: "Air Quality Index" unique_id: air_quality_index icon: mdi:smog @@ -1560,3 +1668,39 @@ state_class: measurement state: "{{ state_attr('sensor.waqi_windsor', 'pm_2_5') }}" availability: "{{ is_number(state_attr('sensor.waqi_windsor', 'pm_2_5')) }}" + + - name: "Atmospheric Smoke" + unique_id: atmospheric_smoke + icon: mdi:smoke + state_class: measurement + unit_of_measurement: "µg/m³" + state: "{{ states('sensor.pirateweather_smoke') | int }}" + availability: "{{ is_number(states('sensor.pirateweather_smoke')) }}" + + ############################################################################### + ## Smoke Risk + ############################################################################### + + - name: "Smoke Risk" + unique_id: smoke_risk + icon: mdi:smoke + state: > + {% from 'weather.jinja' import smoke_risk %} + {{ smoke_risk(states('sensor.atmospheric_smoke') | int ) }} + availability: "{{ is_number(states('sensor.atmospheric_smoke')) }}" + + - name: "Smoke Risk Today" + unique_id: smoke_risk_today + icon: mdi:smoke + state: > + {% from 'weather.jinja' import smoke_risk %} + {{ smoke_risk(states('sensor.pirateweather_smoke_max_0d') | int ) }} + availability: "{{ is_number(states('sensor.pirateweather_smoke_max_0d')) }}" + + - name: "Smoke Risk Tomorrow" + unique_id: smoke_risk_tomorrow + icon: mdi:smoke + state: > + {% from 'weather.jinja' import smoke_risk %} + {{ smoke_risk(states('sensor.pirateweather_smoke_max_1d') | int ) }} + availability: "{{ is_number(states('sensor.pirateweather_smoke_max_1d')) }}" diff --git a/ui/button/alarm/camera.yaml b/ui/button/alarm/camera.yaml index 38f8f00d6..d8c2de4f2 100644 --- a/ui/button/alarm/camera.yaml +++ b/ui/button/alarm/camera.yaml @@ -6,7 +6,7 @@ template: menu_button entity: binary_sensor.camera_object_detected icon: > [[[ - if (states['binary_sensor.offline_cameras_alert'].state == 'on') + if (states['switch.frigate_detection_control'].state == 'off') return 'mdi:cctv-off'; else return 'mdi:cctv'; @@ -42,9 +42,9 @@ tap_action: navigation_path: security-cameras double_tap_action: action: call-service - service: alert.turn_on + service: switch.toggle data: - entity_id: alert.offline_cameras + entity_id: switch.frigate_detection_control hold_action: action: fire-dom-event browser_mod: diff --git a/ui/card/alarm/door_sensors.yaml b/ui/card/alarm/door_sensors.yaml index b4668c0d8..cd418bab8 100644 --- a/ui/card/alarm/door_sensors.yaml +++ b/ui/card/alarm/door_sensors.yaml @@ -23,7 +23,7 @@ entities: entity_id: input_boolean.back_door card_mod: style: | - {% from 'style.jinja' import window_door_sensor %} + {% from 'door.jinja' import window_door_sensor %} {{ window_door_sensor('back_door') }} - entity: binary_sensor.front_door @@ -42,7 +42,7 @@ entities: entity_id: input_boolean.front_door card_mod: style: | - {% from 'style.jinja' import window_door_sensor %} + {% from 'door.jinja' import window_door_sensor %} {{ window_door_sensor('front_door') }} - entity: binary_sensor.garage_side_door @@ -61,7 +61,7 @@ entities: entity_id: input_boolean.garage_side_door card_mod: style: | - {% from 'style.jinja' import window_door_sensor %} + {% from 'door.jinja' import window_door_sensor %} {{ window_door_sensor('garage_side_door') }} - entity: binary_sensor.patio_door @@ -80,7 +80,7 @@ entities: entity_id: input_boolean.patio_door card_mod: style: | - {% from 'style.jinja' import window_door_sensor %} + {% from 'door.jinja' import window_door_sensor %} {{ window_door_sensor('patio_door') }} - entity: binary_sensor.side_door @@ -99,7 +99,7 @@ entities: entity_id: input_boolean.side_door card_mod: style: | - {% from 'style.jinja' import window_door_sensor %} + {% from 'door.jinja' import window_door_sensor %} {{ window_door_sensor('side_door') }} card_mod: class: basic diff --git a/ui/card/alarm/window_sensors.yaml b/ui/card/alarm/window_sensors.yaml index 0022e71ea..c23f4b3c4 100644 --- a/ui/card/alarm/window_sensors.yaml +++ b/ui/card/alarm/window_sensors.yaml @@ -23,7 +23,7 @@ entities: entity_id: input_boolean.bedroom_front_window card_mod: style: | - {% from 'style.jinja' import window_door_sensor %} + {% from 'door.jinja' import window_door_sensor %} {{ window_door_sensor('bedroom_front_window') }} - entity: binary_sensor.bedroom_side_window @@ -42,7 +42,7 @@ entities: entity_id: input_boolean.bedroom_side_window card_mod: style: | - {% from 'style.jinja' import window_door_sensor %} + {% from 'door.jinja' import window_door_sensor %} {{ window_door_sensor('bedroom_side_window') }} - entity: binary_sensor.downstairs_kitchen_window @@ -61,7 +61,7 @@ entities: entity_id: input_boolean.downstairs_kitchen_window card_mod: style: | - {% from 'style.jinja' import window_door_sensor %} + {% from 'door.jinja' import window_door_sensor %} {{ window_door_sensor('downstairs_kitchen_window') }} - entity: binary_sensor.kitchen_sink_window @@ -80,7 +80,7 @@ entities: entity_id: input_boolean.kitchen_sink_window card_mod: style: | - {% from 'style.jinja' import window_door_sensor %} + {% from 'door.jinja' import window_door_sensor %} {{ window_door_sensor('kitchen_sink_window') }} - entity: binary_sensor.kitchen_window @@ -99,7 +99,7 @@ entities: entity_id: input_boolean.kitchen_window card_mod: style: | - {% from 'style.jinja' import window_door_sensor %} + {% from 'door.jinja' import window_door_sensor %} {{ window_door_sensor('kitchen_window') }} - entity: binary_sensor.laundry_room_window @@ -118,7 +118,7 @@ entities: entity_id: input_boolean.laundry_room_window card_mod: style: | - {% from 'style.jinja' import window_door_sensor %} + {% from 'door.jinja' import window_door_sensor %} {{ window_door_sensor('laundry_room_window') }} - entity: binary_sensor.living_room_window_1 @@ -137,7 +137,7 @@ entities: entity_id: input_boolean.living_room_window_1 card_mod: style: | - {% from 'style.jinja' import window_door_sensor %} + {% from 'door.jinja' import window_door_sensor %} {{ window_door_sensor('living_room_window_1') }} - entity: binary_sensor.living_room_window_2 @@ -156,7 +156,7 @@ entities: entity_id: input_boolean.living_room_window_2 card_mod: style: | - {% from 'style.jinja' import window_door_sensor %} + {% from 'door.jinja' import window_door_sensor %} {{ window_door_sensor('living_room_window_2') }} - entity: binary_sensor.living_room_window_3 @@ -175,7 +175,7 @@ entities: entity_id: input_boolean.living_room_window_3 card_mod: style: | - {% from 'style.jinja' import window_door_sensor %} + {% from 'door.jinja' import window_door_sensor %} {{ window_door_sensor('living_room_window_3') }} - entity: binary_sensor.living_room_window_4 @@ -194,7 +194,7 @@ entities: entity_id: input_boolean.living_room_window_4 card_mod: style: | - {% from 'style.jinja' import window_door_sensor %} + {% from 'door.jinja' import window_door_sensor %} {{ window_door_sensor('living_room_window_4') }} - entity: binary_sensor.office_window @@ -213,7 +213,7 @@ entities: entity_id: input_boolean.office_window card_mod: style: | - {% from 'style.jinja' import window_door_sensor %} + {% from 'door.jinja' import window_door_sensor %} {{ window_door_sensor('office_window') }} - entity: binary_sensor.family_room_window @@ -232,7 +232,7 @@ entities: entity_id: input_boolean.family_room_window card_mod: style: | - {% from 'style.jinja' import window_door_sensor %} + {% from 'door.jinja' import window_door_sensor %} {{ window_door_sensor('family_room_window') }} - entity: binary_sensor.master_bathroom_window @@ -251,7 +251,7 @@ entities: entity_id: input_boolean.master_bathroom_window card_mod: style: | - {% from 'style.jinja' import window_door_sensor %} + {% from 'door.jinja' import window_door_sensor %} {{ window_door_sensor('master_bathroom_window') }} - entity: binary_sensor.master_bedroom_window @@ -270,7 +270,7 @@ entities: entity_id: input_boolean.master_bedroom_window card_mod: style: | - {% from 'style.jinja' import window_door_sensor %} + {% from 'door.jinja' import window_door_sensor %} {{ window_door_sensor('master_bedroom_window') }} card_mod: class: basic diff --git a/ui/card/light/bathroom_lights.yaml b/ui/card/light/bathroom_lights.yaml index 610a5f07d..667bd0e1d 100644 --- a/ui/card/light/bathroom_lights.yaml +++ b/ui/card/light/bathroom_lights.yaml @@ -30,7 +30,7 @@ cards: card_mod: style: ha-tile-info$: | # group - must use an individual bulb entity - {% from 'style.jinja' import light_switch %} + {% from 'light.jinja' import light_switch %} {{- light_switch('light.bathroom_vanity_light_rgb_bulb_1', 'switch.adaptive_lighting_bathroom_lights') -}} - type: tile @@ -46,5 +46,5 @@ cards: card_mod: style: ha-tile-info$: | - {% from 'style.jinja' import light_switch %} + {% from 'light.jinja' import light_switch %} {{- light_switch('light.bathroom_shower_light', 'switch.adaptive_lighting_bathroom_lights') -}} diff --git a/ui/card/light/kitchen_lights.yaml b/ui/card/light/kitchen_lights.yaml index c145717e8..db4b514c0 100644 --- a/ui/card/light/kitchen_lights.yaml +++ b/ui/card/light/kitchen_lights.yaml @@ -33,7 +33,7 @@ cards: card_mod: style: ha-tile-info$: | - {% from 'style.jinja' import light_switch %} + {% from 'light.jinja' import light_switch %} {{- light_switch('light.kitchen_potlights', 'switch.adaptive_lighting_main_lights') -}} - type: tile @@ -60,7 +60,7 @@ cards: card_mod: style: ha-tile-info$: | # group - must use an individual channel entity - {% from 'style.jinja' import light_switch %} + {% from 'light.jinja' import light_switch %} {{ light_switch('light.kitchen_cabinet_lights_channel_1', 'switch.adaptive_lighting_cabinet_lights') }} - type: tile @@ -76,7 +76,7 @@ cards: card_mod: style: ha-tile-info$: | - {% from 'style.jinja' import light_switch %} + {% from 'light.jinja' import light_switch %} {{- light_switch('light.dining_room_light_rgb', 'switch.adaptive_lighting_rgb_lights') -}} - type: tile @@ -92,7 +92,7 @@ cards: card_mod: style: ha-tile-info$: | - {% from 'style.jinja' import light_switch %} + {% from 'light.jinja' import light_switch %} {{- light_switch('light.dining_room_potlights', 'switch.adaptive_lighting_main_lights') -}} - type: tile #TEMP fill hole in UI diff --git a/ui/card/light/outside_lights.yaml b/ui/card/light/outside_lights.yaml index 30ae690f1..2d3c1bad8 100644 --- a/ui/card/light/outside_lights.yaml +++ b/ui/card/light/outside_lights.yaml @@ -34,7 +34,7 @@ cards: card_mod: style: ha-tile-info$: | - {% from 'style.jinja' import light_switch %} + {% from 'light.jinja' import light_switch %} {{- light_switch('light.front_porch_light', 'switch.adaptive_lighting_outside_lights') -}} - type: tile @@ -50,7 +50,7 @@ cards: card_mod: style: ha-tile-info$: | - {% from 'style.jinja' import light_switch %} + {% from 'light.jinja' import light_switch %} {{- light_switch('light.front_house_potlights', 'switch.adaptive_lighting_outside_lights') -}} - type: tile @@ -66,7 +66,7 @@ cards: card_mod: style: ha-tile-info$: | - {% from 'style.jinja' import light_switch %} + {% from 'light.jinja' import light_switch %} {{- light_switch('light.back_house_potlights', 'switch.adaptive_lighting_outside_lights') -}} - type: tile @@ -82,7 +82,7 @@ cards: card_mod: style: ha-tile-info$: | - {% from 'style.jinja' import light_switch %} + {% from 'light.jinja' import light_switch %} {{- light_switch('light.outside_garage_lights', 'switch.adaptive_lighting_outside_lights') -}} - type: tile diff --git a/ui/card/light/upstairs_lights.yaml b/ui/card/light/upstairs_lights.yaml index b0915aedc..d0475c3b7 100644 --- a/ui/card/light/upstairs_lights.yaml +++ b/ui/card/light/upstairs_lights.yaml @@ -49,7 +49,7 @@ cards: card_mod: style: ha-tile-info$: | - {% from 'style.jinja' import light_switch %} + {% from 'light.jinja' import light_switch %} {{- light_switch('light.hallway_potlights', 'switch.adaptive_lighting_main_lights') -}} - type: tile @@ -65,7 +65,7 @@ cards: card_mod: style: ha-tile-info$: | - {% from 'style.jinja' import light_switch %} + {% from 'light.jinja' import light_switch %} {{- light_switch('light.living_room_fan_light', 'switch.adaptive_lighting_main_lights') -}} - type: tile @@ -92,7 +92,7 @@ cards: card_mod: style: ha-tile-info$: | - {% from 'style.jinja' import light_switch %} + {% from 'light.jinja' import light_switch %} {{- light_switch('light.living_room_potlights', 'switch.adaptive_lighting_main_lights') -}} - type: tile @@ -108,7 +108,7 @@ cards: card_mod: style: ha-tile-info$: | - {% from 'style.jinja' import light_switch %} + {% from 'light.jinja' import light_switch %} {{- light_switch('light.bedroom_fan_light', 'switch.adaptive_lighting_bedroom_lights') -}} - type: tile @@ -124,7 +124,7 @@ cards: card_mod: style: ha-tile-info$: | - {% from 'style.jinja' import light_switch %} + {% from 'light.jinja' import light_switch %} {{- light_switch('light.bedroom_potlights', 'switch.adaptive_lighting_bedroom_lights') -}} - type: tile @@ -140,7 +140,7 @@ cards: card_mod: style: ha-tile-info$: | - {% from 'style.jinja' import light_switch %} + {% from 'light.jinja' import light_switch %} {{- light_switch('light.office_fan_light', 'switch.adaptive_lighting_main_lights') -}} - type: tile @@ -156,7 +156,7 @@ cards: card_mod: style: ha-tile-info$: | - {% from 'style.jinja' import light_switch %} + {% from 'light.jinja' import light_switch %} {{- light_switch('light.office_potlights', 'switch.adaptive_lighting_main_lights') -}} - type: tile @@ -172,5 +172,5 @@ cards: card_mod: style: ha-tile-info$: | - {% from 'style.jinja' import light_switch %} + {% from 'light.jinja' import light_switch %} {{- light_switch('light.laundry_room_cabinet_lights', 'switch.adaptive_lighting_cabinet_lights') -}} diff --git a/ui/card/weather/today_forecast.yaml b/ui/card/weather/today_forecast.yaml index 23f8be463..7cf7ef6d7 100644 --- a/ui/card/weather/today_forecast.yaml +++ b/ui/card/weather/today_forecast.yaml @@ -55,12 +55,15 @@ entities: - entity: sensor.cloud_cover_today name: "Cloud Cover" - - entity: sensor.pirateweather_smoke_max_0d - name: "Smoke" + - type: custom:template-entity-row + entity: sensor.smoke_risk_today + name: "Smoke Risk" + state: "{{ states('sensor.smoke_risk_today') }}" + secondary: "Smoke Level: {{ states('sensor.atmospheric_smoke', with_unit=true) }}" card_mod: style: > - {% from 'weather.jinja' import smoke_level_icon %} - {{ smoke_level_icon(states('sensor.pirateweather_smoke_max_0d') | int(-1)) }} + {% from 'weather.jinja' import smoke_risk_icon %} + {{ smoke_risk_icon(states('sensor.smoke_risk_today')) }} - type: custom:template-entity-row entity: sensor.fire_risk_today diff --git a/ui/card/weather/tomorrow_forecast.yaml b/ui/card/weather/tomorrow_forecast.yaml index b275e5e14..c467afbab 100644 --- a/ui/card/weather/tomorrow_forecast.yaml +++ b/ui/card/weather/tomorrow_forecast.yaml @@ -28,12 +28,15 @@ entities: Precipitation Expected: {{ states('sensor.precipitation_expected_tomorrow', with_unit=true) }} {% endif %} - - entity: sensor.pirateweather_smoke_max_1d - name: "Smoke" + - type: custom:template-entity-row + entity: sensor.smoke_risk_tomorrow + name: "Smoke Risk" + state: "{{ states('sensor.smoke_risk_tomorrow') }}" + secondary: "Smoke Level: {{ states('sensor.pirateweather_smoke_max_1d', with_unit=true) }}" card_mod: style: > - {% from 'weather.jinja' import smoke_level_icon %} - {{ smoke_level_icon(states('sensor.pirateweather_smoke_max_1d') | int(-1)) }} + {% from 'weather.jinja' import smoke_risk_icon %} + {{ smoke_risk_icon(states('sensor.smoke_risk_tomorrow')) }} - type: custom:template-entity-row entity: sensor.fire_risk_tomorrow diff --git a/ui/card/weather/weather_forecast.yaml b/ui/card/weather/weather_forecast.yaml index 5e8bf213d..4406ad7da 100644 --- a/ui/card/weather/weather_forecast.yaml +++ b/ui/card/weather/weather_forecast.yaml @@ -19,7 +19,6 @@ cards: card: !include /config/ui/button/weather/envcan_alert.yaml - type: custom:hourly-weather - #ISSUE ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [281470230948160] Error handling message: Entity ID 'sensor.hourly_weather' does not belong to domain 'weather' for dictionary value @ data['entity_id']. Got 'sensor.hourly_weather' (invalid_format) Jason from 192.168.1.250 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36) entity: sensor.hourly_weather forecast_type: hourly num_segments: 9 diff --git a/ui/graph/layout/weather_mobile.yaml b/ui/graph/layout/weather_mobile.yaml index c2f7c932d..22ad6d1b4 100644 --- a/ui/graph/layout/weather_mobile.yaml +++ b/ui/graph/layout/weather_mobile.yaml @@ -2,7 +2,7 @@ ## Weather Graph Layout ############################################################################### type: grid -columns: 3 #TEST +columns: 3 square: false cards: - !include /config/ui/graph/weather/temperature.yaml