diff --git a/.HA_VERSION b/.HA_VERSION index 45f05f3de..34ca124e5 100644 --- a/.HA_VERSION +++ b/.HA_VERSION @@ -1 +1 @@ -2025.1.0 \ No newline at end of file +2025.1.2 \ No newline at end of file diff --git a/automations/alarm/alarm_nest_protect_update.yaml b/automations/alarm/alarm_nest_protect_update.yaml new file mode 100644 index 000000000..35423f586 --- /dev/null +++ b/automations/alarm/alarm_nest_protect_update.yaml @@ -0,0 +1,44 @@ +############################################################################### +## Alarm - Nest Protect Update +## This automation updates entities from the Next Protect integration every +## 5 minutes as a heartbeat and update the last_reported attribute so we can +## determine if the integration is connected or not +############################################################################### +- id: alarm_nest_protect_update + alias: "[Alarm] Nest Protect Update" + description: "Update next protect entities." + triggers: + - trigger: time_pattern + minutes: "/1" + conditions: + - condition: state + entity_id: + - binary_sensor.nest_protect_integration_connected + - binary_sensor.wan + state: "on" + actions: + - action: homeassistant.update_entity + data: + entity_id: binary_sensor.nest_protect_upstairs_smoke_status + +############################################################################### +## Alarm - Nest Protect WAN Reset +## This automation reloads the Nest Protect integration when the WAN +## goes offline to clear sensor values and then again when the WAN goes +## online to refresh the sensor values. +############################################################################### +- id: alarm_nest_protect_wan_reset + alias: "[Alarm] Nest Protect WAN Reset" + description: "Reset next protect when WAN status changes." + mode: restart + triggers: + - trigger: state + entity_id: binary_sensor.wan + to: "off" + not_from: + - unknown + - unavailable + actions: + - action: homeassistant.reload_config_entry + target: + entity_id: binary_sensor.nest_protect_upstairs_smoke_status diff --git a/automations/camera/camera_event_detection_control.yaml b/automations/camera/camera_event_detection_control.yaml index 207a9a4a5..32464ef01 100644 --- a/automations/camera/camera_event_detection_control.yaml +++ b/automations/camera/camera_event_detection_control.yaml @@ -18,6 +18,7 @@ # reset when disabled after 8 hours - trigger: state + id: disabled entity_id: input_boolean.camera_event_detection to: "off" for: @@ -32,9 +33,11 @@ - armed_away - armed_vacation actions: - - action: input_boolean.turn_on - target: - entity_id: input_boolean.camera_event_detection + - if: "{{ trigger.id == 'disabled' }}" + then: + - action: input_boolean.turn_on + target: + entity_id: input_boolean.camera_event_detection - wait_template: > {{ is_state('binary_sensor.frigate_integration_connected', 'on') diff --git a/automations/camera/camera_indoor_camera_control.yaml b/automations/camera/camera_indoor_camera_control.yaml index b2e8993b3..23b1e555f 100644 --- a/automations/camera/camera_indoor_camera_control.yaml +++ b/automations/camera/camera_indoor_camera_control.yaml @@ -14,6 +14,7 @@ replace='switch.\\1_camera_power', ignorecase=False) | list }} triggers: - trigger: homeassistant + id: starup event: start - trigger: state @@ -33,6 +34,16 @@ attribute: entity_id to: actions: + - if: "{{ trigger.id == 'startup' }}" + then: + - wait_template: > + {{ states('group.indoor_cameras') not in ['unknown', 'unavailable'] + and states('binary_sensor.someone_home') not in ['unknown', 'unavailable'] + and is_state('binary_sensor.wyze_integration_connected', 'on') }} + timeout: 300 + + - stop: "Startup didn't complete." + - if: "{{ entities == none or entities | count == 0 }}" then: - stop: "No valid entities." @@ -52,12 +63,13 @@ ############################################################################### ## Camera - Restart Wyze ############################################################################### -- id: camera_restart_wyze #TEST not required now? +- id: camera_restart_wyze alias: "[Camera] Restart Wyze" description: "Restart the Wyze addon." max_exceeded: silent triggers: - trigger: homeassistant + id: startup event: start - trigger: state @@ -68,11 +80,16 @@ - unknown - unavailable for: 60 - conditions: - - condition: state - entity_id: binary_sensor.wyze_integration_connected - state: "off" actions: + - if: "{{ trigger.id == 'startup' }}" + then: + - wait_template: "{{ is_state('binary_sensor.wyze_integration_connected', 'on') }}" + timeout: 300 + + - condition: state + entity_id: binary_sensor.wyze_integration_connected + state: "off" + - action: hassio.addon_restart data: addon: 7094bb28_docker_wyze_bridge diff --git a/automations/hass/hass_update_group_entities.yaml b/automations/hass/hass_update_group_entities.yaml index c282f1536..b27104a2d 100644 --- a/automations/hass/hass_update_group_entities.yaml +++ b/automations/hass/hass_update_group_entities.yaml @@ -105,34 +105,6 @@ #TEMP exclude front_door_lock - lock not working #TEMP exclude tempest, weatherflow - sensor down #TEMP exclude hydrawise - API errors - entities: > - {{ states - | selectattr('state', 'in', ['unknown', 'unavailable']) - | rejectattr('domain', 'in', ['button', 'conversation', 'device_tracker', 'event', 'group', 'image', 'input_button', 'input_text', 'remote', 'tts', 'scene', 'stt']) - | rejectattr('entity_id', 'in', integration_entities('browser_mod')) - | rejectattr('entity_id', 'in', integration_entities('fully_kiosk')) - | rejectattr('entity_id', 'in', integration_entities('hassio')) - | rejectattr('entity_id', 'in', integration_entities('dlna_dmr')) - | rejectattr('entity_id', 'in', integration_entities('balboa')) - | rejectattr('entity_id', 'in', integration_entities('weatherflow')) - | rejectattr('entity_id', 'in', integration_entities('hydrawise')) - | rejectattr('entity_id', 'in', device_entities('c333f39f8e120425543d2b317af99af3')) - | rejectattr('entity_id', 'in', device_entities('95775b8130a626f30b27207298764c44')) - | rejectattr('entity_id', 'in', device_entities('95775b8130a626f30b27207298764c44')) - | rejectattr('entity_id', 'in', state_attr('group.ignored_unavailable_entities', 'entity_id')) - | rejectattr('entity_id', 'contains', '_next_cycle') - | rejectattr('entity_id', 'contains', 'sensor.system_monitor_network') - | rejectattr('entity_id', 'search', 'charlie_cam_camera|living_room_camera') - | rejectattr('entity_id', 'search', '_door_lock_intrusion|_door_lock_lock_jammed|_door_lock_keypad_temporary_disabled|_door_lock_system_hardware_failure') - | rejectattr('entity_id', 'search', '_timers|_alarms|_next_alarm') - | rejectattr('entity_id', 'search', 'select.media_artist_filter|select.media_album_filter') - | rejectattr('entity_id', 'contains', 'garage_inside') - | rejectattr('entity_id', 'contains', 'front_door_lock') - | map(attribute='entity_id') | list | sort }} - - - action: group.set - data: - object_id: unavailable_entities_filtered2 #TEST entities: > {% set ignored2 = state_attr('sensor.disabled_device_entities', 'entities') |regex_replace(find='\[|\]|\{|\}|\'entity_id\':', replace='') %} @@ -161,7 +133,6 @@ | rejectattr('entity_id', 'contains', 'front_door_lock') | map(attribute='entity_id') | list | sort }} - - action: group.set data: object_id: google_home_timers diff --git a/automations/network/network_update_group_entities.yaml b/automations/network/network_update_group_entities.yaml index f02b489b0..8f9a6c007 100644 --- a/automations/network/network_update_group_entities.yaml +++ b/automations/network/network_update_group_entities.yaml @@ -40,8 +40,8 @@ {{ states.device_tracker | selectattr('attributes.device_type', 'defined') | selectattr('attributes.device_type', 'eq', 'wireless') - | map(attribute='entity_id') | list | sort }} - + | map(attribute='entity_id') | list + | select('has_value') | sort }} - action: group.set data: object_id: unknown_devices @@ -49,18 +49,21 @@ {{ states.device_tracker | rejectattr('attributes.device_type', 'in', ['bluetooth', 'wired', 'wireless', 'location', 'bluetooth_le']) - | map(attribute='entity_id') | select('has_value') | list | sort }} + | map(attribute='entity_id') | list + | select('has_value') | sort }} - action: group.set data: object_id: bluetooth_devices entities: > {{ states.device_tracker | selectattr('attributes.device_type', 'eq', 'bluetooth') - | map(attribute='entity_id') | list | sort }} + | map(attribute='entity_id') | list + | select('has_value') | sort }} - action: group.set data: object_id: bluetooth_le_devices entities: > - {{ states.device_tracker | selectattr('attributes.device_type', 'eq', 'bluetooth_le') - | map(attribute='entity_id') | list | sort }} + {{ states.device_tracker | selectattr('attributes.source_type', 'eq', 'bluetooth_le') + | map(attribute='entity_id') | list + | select('has_value') | sort }} diff --git a/automations/schedule/commute/commute_before_work.yaml b/automations/schedule/commute/commute_before_work.yaml index 6e404a4c7..e818c1320 100644 --- a/automations/schedule/commute/commute_before_work.yaml +++ b/automations/schedule/commute/commute_before_work.yaml @@ -22,8 +22,6 @@ for: minutes: 5 actions: - - action: script.work_commute_lights - - if: - condition: state entity_id: binary_sensor.work_commute_active @@ -33,6 +31,8 @@ entity_id: binary_sensor.jason_home state: "on" then: + - action: script.work_commute_lights + - action: script.turn_on target: entity_id: script.tts_play diff --git a/custom_templates/alarm.jinja b/custom_templates/alarm.jinja index a07377e41..edef58e4e 100644 --- a/custom_templates/alarm.jinja +++ b/custom_templates/alarm.jinja @@ -59,7 +59,7 @@ {%- if is_state('binary_sensor.nest_protect_' ~ location ~ '_smoke_status', 'on') %} UPSTAIRS - SMOKE {%- elif is_state('binary_sensor.nest_protect_' ~ location ~ '_co_status', 'on') %} UPSTAIRS - CARBON DIOXIDE {%- elif is_state('binary_sensor.nest_protect_' ~ location ~ '_heat_status', 'on') %} UPSTAIRS - HEAT -{%- else %} Upstairs Protect +{%- else %} {{ location | title }} Protect {%- endif -%} {%- endmacro -%} diff --git a/custom_templates/schedule.jinja b/custom_templates/schedule.jinja index 06185d17e..2a2084af0 100644 --- a/custom_templates/schedule.jinja +++ b/custom_templates/schedule.jinja @@ -29,4 +29,8 @@ You're either very late or very early. Figure it out dude. {%- else %} Check the clock! Your time to leave for work can not be determined today! {%- endif -%} +{%- endmacro -%} + +{%- macro twelve_hour(entity) -%} +{{- states(entity) | as_timestamp(none) | timestamp_custom('%-I:%M %p', true, none) -}} {%- endmacro -%} \ No newline at end of file diff --git a/custom_templates/speech.jinja b/custom_templates/speech.jinja deleted file mode 100644 index 8a30ae43b..000000000 --- a/custom_templates/speech.jinja +++ /dev/null @@ -1,78 +0,0 @@ -{%- macro twelve_hour(entity) -%} -{{- states(entity) | as_timestamp(none) | timestamp_custom('%-I:%M %p', true, none) -}} -{%- endmacro -%} - -{%- macro cardinal_direction(bearing) %} -{%- set bearing = bearing | int(-1) %} -{%- set directions = ['N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SE', 'SSE', 'S', - 'SSW', 'SW', 'WSW', 'W', 'WNW', 'NW', 'NNW', 'N'] %} -{{- iif(bearing >= 0, directions[((bearing | float(-1)/360) | float*16) | round], 'unknown') -}} -{%- endmacro -%} - -{%- macro full_cardinal_direction(bearing) -%} -{%- set bearing = bearing | int(-1) %} -{%- set directions = ['North', 'North-Northeast', 'Northeast', 'East-Northeast', 'East', 'East-Southeast', - 'Southeast', 'South-Southeast', 'South', 'South-Southwest', 'Southwest', 'West-Southwest', 'West', - 'West-Northwest', 'Northwest', 'North-Northwest', 'North'] %} -{{- iif(bearing >= 0, directions[((bearing | float(-1)/360) | float*16) | round], 'unknown') -}} -{%- endmacro -%} - -{%- macro array_to_clist(arr, title) -%} -{%- from 'speech_helpers.jinja' import plural_word %} -{%- set clist = ', and ' if arr | count > 2 else ' and ' -%} -{%- set text = arr | join(', ') %} -{%- if title %}{{ clist.join((text | title).rsplit(', ', 1)) -}} -{%- else %}{{ clist.join(text.rsplit(', ', 1)) -}} -{%- endif %} -{%- endmacro -%} - -{%- macro clist_suffix(arr, title, suffix, word) -%} -{%- from 'speech_helpers.jinja' import array_to_clist %} -{%- from 'speech_helpers.jinja' import plural_word %} -{{- array_to_clist(arr, title) }} -{%- if suffix or word != '' %} {{ plural_word(word, arr | count, suffix) }} -{%- endif %} -{%- endmacro -%} - -{%- macro iarticle(word) -%} -{%- if is_number(word) %} - {%- set word = number_words(word) %} -{%- endif %} -{%- if word | regex_match('one|uni') -%} {{ 'a ' }} -{%- elif word | regex_match('heir|hour|honor|honest|homage') %} {{ 'an ' }} -{%- else -%} {{ iif(word[0] in ['a', 'e', 'i' , 'o', 'u'], 'an ', 'a ') }} -{%- endif -%} -{{- word -}} -{%- endmacro -%} - -{%- macro number_words(number) -%} -{%- if is_number(number) %} - {%- from 'speech_helpers.jinja' import number_words %} - {%- set number = number | int %} - {%- set units = ['', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven ', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen'] %} - {%- set tens = ['', '', 'twenty ', 'thirty ', 'forty ', 'fifty ', 'sixty ', 'seventy ', 'eighty ', 'ninety '] %} - {%- if number == 0 -%} zero - {%- else %} - {%- if number < 0 -%} negative {% endif %} - {%- if number < 20 -%} {{ units[number] }} - {%- elif number < 100 -%} {{ tens[number // 10] ~ units[number % 10] }} - {%- elif number < 1000 -%} {{ number_words(number // 100) ~ ' hundred ' ~ iif(number % 100 > 0, number_words(number % 100), '') }} - {%- elif number < 1000000 -%} {{ number_words(number // 1000) ~ ' thousand ' ~ iif(number % 1000 > 0, number_words(number % 1000), '') }} - {%- elif number < 1000000000 -%} {{ number_words(number // 1000000) ~ ' million ' ~ iif(number % 1000000 > 0, number_words(number % 1000000), '') }} - {%- elif number < 1000000000000 -%} {{ number_words(number // 1000000000) ~ ' billion ' ~ iif(number % 1000000000 > 0, number_words(number % 1000000000), '') }} - {%- else -%} {{ number_words(number // 1000000000000) ~ ' trillion ' ~ iif(number % 1000000000000 > 0, number_words(number % 1000000000000), '') }} - {%- endif %} - {%- endif %} -{%- endif -%} -{%- endmacro -%} - -{%- macro plural_word(word, qty, suffix) -%} -{%- if is_number(qty) %} -{{- word ~ iif(word != '', iif(qty | abs == 1, '', 's'),'') ~ iif(suffix, iif(qty | abs == 1, ' is', ' are'),'') }} -{%- endif -%} -{%- endmacro -%} - -{%- macro plural_qty(word, qty, suffix) -%} -{%- from 'speech_helpers.jinja' import plural_word -%} -{{ qty }} {{ plural_word(word, qty, suffix) }} -{%- endmacro -%} \ No newline at end of file diff --git a/custom_templates/speech_helpers.jinja b/custom_templates/speech_helpers.jinja index 8a30ae43b..38e08f8bc 100644 --- a/custom_templates/speech_helpers.jinja +++ b/custom_templates/speech_helpers.jinja @@ -1,7 +1,3 @@ -{%- macro twelve_hour(entity) -%} -{{- states(entity) | as_timestamp(none) | timestamp_custom('%-I:%M %p', true, none) -}} -{%- endmacro -%} - {%- macro cardinal_direction(bearing) %} {%- set bearing = bearing | int(-1) %} {%- set directions = ['N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SE', 'SSE', 'S', diff --git a/custom_templates/weather.jinja b/custom_templates/weather.jinja index c06de5703..fd94467b5 100644 --- a/custom_templates/weather.jinja +++ b/custom_templates/weather.jinja @@ -169,6 +169,24 @@ Be careful driving and } {%- endmacro -%} +{%- macro precipitation_intensity_color(intensity) -%} +:host { + --paper-item-icon-color: + {%- set intensity = intensity | int(none) %} + {%- if intensity == none %} var(--entity-disabled-color) + {%- elif intensity == 0 %} var(--state-icon-color) + {%- elif intensity < 1 %} rgb(60, 116, 160) + {%- elif intensity < 4 %} rgb(59, 161, 161) + {%- elif intensity < 15 %} rgb(59, 161, 61) + {%- elif intensity < 20 %} rgb(130, 161, 59) + {%- elif intensity < 30 %} rgb(161, 59, 59) + {%- elif intensity < 50 %} rgb(161, 59, 161) + {%- else %} rgb(148, 79, 237) + {%- endif %} + ; +} +{%- endmacro -%} + {%- macro wind_color(wind) -%} :host { --paper-item-icon-color: diff --git a/logging/recorder.yaml b/logging/recorder.yaml index 9418d25fb..d89d1e21b 100644 --- a/logging/recorder.yaml +++ b/logging/recorder.yaml @@ -122,6 +122,8 @@ include: - sensor.home_sensors_lightnings_strikes - sensor.outdoor_temperature_24_hour_mean - sensor.outdoor_temperature_24_hour_median + - sensor.indoor_dew_point_test + - sensor.outdoor_dew_point_test # ~~~~ Tempest ~~~~ # graphs - sensor.tempest_st_00057689_battery @@ -187,8 +189,12 @@ include: - sensor.load_5m - sensor.load_15m - sensor.memory_use_percent - - - sensor.system_monitor_network_in_enp3s0 #TEST + - sensor.processor_use_percent + - sensor.processor_temperature + - sensor.swap_use_percent + - sensor.wan_ping_round_trip_time_average + #TEST + - sensor.system_monitor_network_in_enp3s0 - sensor.system_monitor_network_in_wlp4s0 - sensor.system_monitor_network_out_enp3s0 - sensor.system_monitor_network_out_wlp4s0 @@ -199,7 +205,7 @@ include: - sensor.system_monitor_network_in_docker0 - sensor.system_monitor_network_out_docker0 - - sensor.system_monitor_network_throughput_in_enp3s0 #TEST + - sensor.system_monitor_network_throughput_in_enp3s0 - sensor.system_monitor_network_throughput_out_enp3s0 - sensor.system_monitor_network_throughput_in_wlp4s0 - sensor.system_monitor_network_throughput_out_wlp4s0 @@ -210,11 +216,6 @@ include: - sensor.system_monitor_network_throughput_in_lo - sensor.system_monitor_network_throughput_out_lo - - sensor.processor_use_percent - - sensor.processor_temperature - - sensor.swap_use_percent - - sensor.wan_ping_round_trip_time_average - # ~~~~ RPi Monitor ~~~~ # graphs - sensor.rpi_temp_raspberrypi - sensor.rpi_memory_use_percent diff --git a/packages/bluetooth.yaml b/packages/bluetooth.yaml index 0375ba69e..d95228a98 100644 --- a/packages/bluetooth.yaml +++ b/packages/bluetooth.yaml @@ -36,17 +36,6 @@ homeassistant: device_tracker.bedroom_tv_bt: device_type: bluetooth - device_tracker.upstairs_protect_ble: - device_type: bluetooth_le - device_tracker.downstairs_protect_ble: - device_type: bluetooth_le - device_tracker.weatherflow_hub_ble: - device_type: bluetooth_le - device_tracker.jason_laptop_ble: - device_type: bluetooth_le - device_tracker.jason_tablet_ble: - device_type: bluetooth_le - input_boolean: bluetooth_alerts: name: "Bluetooth Alerts" @@ -59,7 +48,7 @@ device_tracker: # request_rssi: true - platform: bluetooth_le_tracker - track_new_devices: false + track_new_devices: true track_battery: true track_battery_interval: "4:00" diff --git a/packages/unavailable_entities.yaml b/packages/unavailable_entities.yaml index 2ff12ceab..1b6e19b6d 100644 --- a/packages/unavailable_entities.yaml +++ b/packages/unavailable_entities.yaml @@ -5,17 +5,17 @@ ## USAGE: https://github.com/jazzyisj/unavailable-entities-sensor/blob/main/README.md ################################################################################################### -command_line: #TEST +# REQUIRED - This command line sensor is a list disabled entities +command_line: sensor: name: Disabled Device Entities unique_id: disabled_device_entities json_attributes: - entities - value_template: > - {{ value_json.entities | length }} + value_template: "{{ value_json.entities | length }}" command: 'jq ''.data.entities |= map(select(.disabled_by? != null) | {entity_id: .entity_id}) | del(.data.deleted_entities) | flatten | .[3]'' < .storage/core.entity_registry' -# REQUIRED - This is the template sensor +# REQUIRED - This template sensor is the number of unavailable entities template: - sensor: - name: "Unavailable Entities" @@ -26,16 +26,8 @@ template: {% set entities = state_attr('group.unavailable_entities', 'entity_id') %} {{ entities | count if entities != none else -1 }} - - name: "Unavailable Entities2" - unique_id: unavailable_entities2 - icon: "{{ iif(states(this.entity_id)|int(-1) > 0, 'mdi:alert-circle', 'mdi:check-circle') }}" - state_class: measurement - state: > - {% set entities = state_attr('group.unavailable_entities2', 'entity_id') %} - {{ entities | count if entities != none else -1 }} - - name: "Unavailable Devices" - unique_id: unavailable_devices + unique_id: unavailable_devices #TEST icon: "{{ iif(states(this.entity_id)|int(-1) > 0, 'mdi:alert-circle', 'mdi:check-circle') }}" state: > {% set devices = state_attr(this.entity_id, 'devices') %} @@ -51,7 +43,7 @@ template: {{ ns.rows }} - name: "Unavailable Devices Plus" - unique_id: unavailable_devices_plus + unique_id: unavailable_devices_plus #TEST icon: "{{ iif(states(this.entity_id)|int(-1) > 0, 'mdi:alert-circle', 'mdi:check-circle') }}" state: > {% set devices = state_attr(this.entity_id, 'devices') %} @@ -84,12 +76,12 @@ template: {%- endfor %} {{ devices.items + entities.items }} -# REQUIRED - Add individual entities to ignore to this group. +# REQUIRED - Add individual entities to ignore to this group (remove [] if adding entities) group: ignored_entities: entities: [] -# REQUIRED - This is required to create and update the monitored entities group. Updates once every minute. +# REQUIRED - This automation is required to create and update the monitored entities group. Updates once every minute. automation: - id: update_unavailable_entities_group alias: "Update Unavailable Entities Group" @@ -110,30 +102,18 @@ automation: - trigger: time_pattern minutes: "/1" actions: - # IMPORTANT - This is the template to edit to exclude entities with filters. + # IMPORTANT - This is the template to edit to bulk exclude entities with filters. - action: group.set data: object_id: unavailable_entities entities: > - {{ states - | rejectattr('domain', 'in', ['button', 'conversation', 'event', 'group', 'image', - 'input_button', 'input_text', 'remote', 'tts', 'scene', 'stt']) - | rejectattr('entity_id', 'in', state_attr('group.ignored_entities', 'entity_id')) - | selectattr('state', 'in', ['unknown', 'unavailable']) - | map(attribute='entity_id') | list | sort }} - - - action: group.set - data: - object_id: unavailable_entities2 - entities: > - {% set ignored2 = state_attr('sensor.disabled_device_entities', 'entities') + {% set disabled = state_attr('sensor.disabled_device_entities', 'entities') |regex_replace(find='\[|\]|\{|\}|\'entity_id\':', replace='') %} {{ states | rejectattr('domain', 'in', ['button', 'conversation', 'event', 'group', 'image', 'input_button', 'input_text', 'remote', 'tts', 'scene', 'stt']) | rejectattr('entity_id', 'in', state_attr('group.ignored_entities', 'entity_id')) - | rejectattr('entity_id', 'in', ignored2) - | rejectattr('entity_id', 'eq', 'group.unavailable_entities') + | rejectattr('entity_id', 'in', disabled) | selectattr('state', 'in', ['unknown', 'unavailable']) | map(attribute='entity_id') | list | sort }} diff --git a/python_scripts/set_state.py b/python_scripts/set_state.py index 173ac11bf..c855b4e2b 100644 --- a/python_scripts/set_state.py +++ b/python_scripts/set_state.py @@ -7,7 +7,7 @@ # ======================================================================================== # ---------------------------------------------------------------------------------------- -# Set the state or other attributes for the specified entity. +# Set the state or other attributes for the specified entity. # Updates from @xannor so that a new entity can be created if it does not exist. # ---------------------------------------------------------------------------------------- diff --git a/scripts/schedule/waketime.yaml b/scripts/schedule/waketime.yaml index 70da98aed..309ec1ad9 100644 --- a/scripts/schedule/waketime.yaml +++ b/scripts/schedule/waketime.yaml @@ -127,7 +127,6 @@ waketime: - light.kitchen_potlights - light.kitchen_cabinet_lights - light.laundry_room_cabinet_lights - - light.living_room_fan_light profile: default_low transition: 120 activate_timer: false @@ -147,7 +146,6 @@ waketime: - light.kitchen_cabinet_lights - light.laundry_room_cabinet_lights - light.kitchen_sink_light - - light.living_room_fan_light profile: default transition: 120 activate_timer: false @@ -278,4 +276,3 @@ waketime_switch: - action: script.turn_on target: entity_id: script.waketime - diff --git a/templates/alarm.yaml b/templates/alarm.yaml index 2c9a71b97..9c9439253 100644 --- a/templates/alarm.yaml +++ b/templates/alarm.yaml @@ -16,9 +16,10 @@ picture: !secret NEST_PROTECT_ICON device_class: connectivity state: > + {%- set threshold = now() - timedelta(minutes=15) %} {{ expand(integration_entities('nest_protect')) - | map(attribute='entity_id') - | list | select('has_value') | list | count > 0 }} + | selectattr('last_reported', 'gt', threshold) + | list | count > 0 }} - binary_sensor: - name: "Nest Protect Connected Alert" @@ -33,14 +34,12 @@ unique_id: nest_protect_upstairs_connected # used in ui button icon: mdi:smoke-detector-variant device_class: connectivity - # device_tracker usually not_home state: "{{ has_value('binary_sensor.nest_protect_upstairs_smoke_status') }}" - name: "Nest Protect Downstairs Connected" unique_id: nest_protect_downstairs_connected # used in ui button icon: mdi:smoke-detector-variant device_class: connectivity - # device_tracker usually not_home state: "{{ has_value('binary_sensor.nest_protect_downstairs_smoke_status') }}" - name: "Alarm Disabled Alert" diff --git a/templates/bluetooth.yaml b/templates/bluetooth.yaml index c832cd0aa..a9d6c90c2 100644 --- a/templates/bluetooth.yaml +++ b/templates/bluetooth.yaml @@ -17,7 +17,7 @@ unique_id: bluetooth_offline_alert icon: mdi:bluetooth-off device_class: problem - delay_on: 120 #TEMP until real bt check - allow devices to connect + delay_on: 120 #TEMP until real bt check - allow devices to reconnect state: > {{ is_state('binary_sensor.bluetooth_network', 'off') and is_state('input_boolean.bluetooth_alerts', 'on') }} diff --git a/templates/google_home.yaml b/templates/google_home.yaml index 91b3ac542..d6bce2568 100644 --- a/templates/google_home.yaml +++ b/templates/google_home.yaml @@ -152,7 +152,7 @@ {{ alarm_state('sensor.dining_room_hub_alarms') }} attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} availability: "{{ has_value('sensor.dining_room_hub_alarms') }}" @@ -167,7 +167,7 @@ {{ alarm_state('sensor.bedroom_hub_alarms') }} attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} availability: "{{ has_value('sensor.bedroom_hub_alarms') }}" @@ -182,7 +182,7 @@ {{ alarm_state('sensor.living_room_speaker_alarms') }} attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} availability: "{{ has_value('sensor.living_room_speaker_alarms') }}" @@ -197,7 +197,7 @@ {{ alarm_state('sensor.bathroom_speaker_alarms') }} attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} availability: "{{ has_value('sensor.bathroom_speaker_alarms') }}" @@ -212,7 +212,7 @@ {{ alarm_state('sensor.office_hub_alarms') }} attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} availability: "{{ has_value('sensor.office_hub_alarms') }}" @@ -227,7 +227,7 @@ {{ alarm_state('sensor.office_speaker_alarms') }} attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} availability: "{{ has_value('sensor.office_speaker_alarms') }}" @@ -242,6 +242,6 @@ {{ alarm_state('sensor.laundry_room_speaker_alarms') }} attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} availability: "{{ has_value('sensor.laundry_room_speaker_alarms') }}" diff --git a/templates/hass.yaml b/templates/hass.yaml index efa2bb1ec..dbcd024ea 100644 --- a/templates/hass.yaml +++ b/templates/hass.yaml @@ -33,7 +33,7 @@ action: - if: "{{ trigger.event.data.get('log', state_attr('sensor.variables', 'log_events')) }}" then: - - action: system_log.write #TEST + - action: system_log.write data: logger: sensor.variables level: critical @@ -216,14 +216,6 @@ {% set entities = state_attr('group.unavailable_entities_filtered', 'entity_id') %} {{ entities | count if entities != none else -1 }} - - name: "Unavailable Entities Filtered2" - unique_id: unavailable_entities_filtered2 #TEST - icon: "{{ iif(states(this.entity_id) | int(-1) > 0, 'mdi:alert-circle', 'mdi:check-circle') }}" - state_class: measurement - state: > - {% set entities = state_attr('group.unavailable_entities_filtered2', 'entity_id') %} - {{ entities | count if entities != none else -1 }} - - name: "Offline Integrations" unique_id: offline_integrations icon: "{{ iif(states(this.entity_id) == '0', 'mdi:api', 'mdi:api-off') }}" diff --git a/templates/media/alarm_clock.yaml b/templates/media/alarm_clock.yaml index 5d1f373a8..a1661f5ce 100644 --- a/templates/media/alarm_clock.yaml +++ b/templates/media/alarm_clock.yaml @@ -457,7 +457,7 @@ {% else %} pending {% endif %} 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} - name: "Alarm Clock Manual Next Alarm" @@ -489,7 +489,7 @@ {% else %} pending {% endif %} 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} - name: "Alarm Clock Nap Next Alarm" @@ -515,7 +515,7 @@ {% else %} pending {% endif %} 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} # other alarm clocks set in next 24 hours @@ -555,7 +555,7 @@ {% endif %} {{ source.value }} 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} # earliest of wake, manual, phone, google home alarms in next 24 hours @@ -607,5 +607,5 @@ {% else %} {{ none }} {% endif %} 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} diff --git a/templates/mobile/mobile_jason.yaml b/templates/mobile/mobile_jason.yaml index 35e7ebb01..4114ba1ff 100644 --- a/templates/mobile/mobile_jason.yaml +++ b/templates/mobile/mobile_jason.yaml @@ -340,5 +340,5 @@ and has_value('sensor.jphone_next_alarm') else none }} attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} diff --git a/templates/schedule/commute.yaml b/templates/schedule/commute.yaml index 5dbea1c6f..6f7243252 100644 --- a/templates/schedule/commute.yaml +++ b/templates/schedule/commute.yaml @@ -144,7 +144,7 @@ and has_value('sensor.arrive_work_time_target') and time > -1 else none }} attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} - name: "Leave Home Time" @@ -155,7 +155,7 @@ if has_value('sensor.leave_home_time_jason') else none }} attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} leave_min: > {{ ((as_timestamp(states('sensor.leave_home_time')) - now().timestamp()) / 60) | int @@ -176,7 +176,7 @@ if has_value('sensor.jason_time_to_work') else none }} attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} late_time: > {% if is_state('binary_sensor.work_today', 'on') @@ -205,7 +205,7 @@ {% endif %} attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} #MIDNIGHT if leave time is before day_reset and now is after reset, leave time is +1 day for today's leave time @@ -223,7 +223,7 @@ {% endif %} attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} - name: "Arrive Home Time" @@ -234,7 +234,7 @@ if has_value('sensor.jason_time_to_home') else none }} attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} - name: "Arrive Home Time Target" @@ -246,5 +246,5 @@ and has_value('sensor.leave_work_time') else none }} attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} diff --git a/templates/schedule/schedule.yaml b/templates/schedule/schedule.yaml index e5e7f2305..d492d93a8 100644 --- a/templates/schedule/schedule.yaml +++ b/templates/schedule/schedule.yaml @@ -130,7 +130,7 @@ {% endif %} attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} # set end +1 day if now > end (waketime + minutes after) @@ -150,7 +150,7 @@ {% endif %} attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} - name: "TOD Greeting" @@ -201,7 +201,7 @@ {{ waketime }} attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} - name: "Next Waketime" @@ -248,7 +248,7 @@ {{- wake_tomorrow if now() > wake_today else wake_today -}} attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} availability: "{{ has_value('sensor.waketime_today') }}" @@ -280,7 +280,7 @@ {{ bedtime }} attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} - name: "Next Bedtime" @@ -311,7 +311,7 @@ {{ bedtime if bedtime > now() else bedtime + timedelta(days=1) }} attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} availability: "{{ has_value('sensor.waketime_today') }}" @@ -325,7 +325,7 @@ {{ bedtime_warning }} attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} availability: "{{ has_value('sensor.bedtime_today') }}" @@ -347,6 +347,6 @@ {{ bedtime }} attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} availability: "{{ has_value('sensor.bedtime_today') }}" diff --git a/templates/weather/weather.yaml b/templates/weather/weather.yaml index 23665789a..318afd0ba 100644 --- a/templates/weather/weather.yaml +++ b/templates/weather/weather.yaml @@ -355,7 +355,7 @@ state: "{{ integration_entities('waqi') | select('has_value') | list | count > 0 }}" ############################################################################### -## Temperature Trigger Sensors #TODO throttle updates (tempest) +## Temperature Trigger Sensors ############################################################################### - trigger: - trigger: homeassistant @@ -364,7 +364,7 @@ - trigger: event event_type: event_template_reloaded - - trigger: time_pattern + - trigger: time_pattern #TODO throttle updates (tempest) minutes: "/10" sensor: - name: "Outdoor Apparent Temperature" @@ -958,7 +958,7 @@ state: "{{ states('sensor.pirateweather_daytime_high_temperature_time_0d') | as_datetime }}" attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} provider: "Pirate Weather" availability: "{{ has_value('sensor.pirateweather_daytime_high_temperature_time_0d') }}" @@ -983,7 +983,7 @@ state: "{{ states('sensor.pirateweather_daytime_high_temperature_time_0d') | as_datetime }}" attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} provider: "Pirate Weather" availability: "{{ has_value('sensor.pirateweather_daytime_high_temperature_time_0d') }}" @@ -1035,7 +1035,7 @@ state: "{{ states('sensor.pirateweather_daily_low_temperature_time_0d') | as_datetime }}" attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} provider: "Pirate Weather" availability: "{{ has_value('sensor.pirateweather_daily_low_temperature_time_0d') }}" @@ -1060,7 +1060,7 @@ state: "{{ states('sensor.pirateweather_daily_low_temperature_time_1d') | as_datetime }}" attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} provider: "Pirate Weather" availability: "{{ has_value('sensor.pirateweather_daily_low_temperature_time_1d') }}" @@ -1473,24 +1473,22 @@ {% elif type == 'snow' %} mdi:weather-snowy {% else %} mdi:weather-rainy {% endif %} - # check tempest intensity > 0 when condition is rain for local accuaracy - state: - > #TODO states('sensor.tempest_st_00057689_rain_intensity') | float(-1) > 0 + # rain - check tempest intensity > 0 for local accuaracy + state: > {% set condition = states('sensor.current_condition') %} {% if condition | contains('snow') %} snow - {% elif states('sensor.tempest_st_00057689_rain_intensity') | float(-1) == -1 - and (condition | contains('rain') - or condition | contains('pouring') - or condition | contains('storm') - or condition | contains('lightning') - or condition | contains('hail')) %} rain - {% elif states('sensor.precipitation_intensity') | float(-1) > 0 %} - {% if is_state('binary_sensor.freezing', 'off') %} rain + {% elif states('sensor.tempest_st_00057689_rain_intensity') | float(-1) > 0 + or states('sensor.precipitation_intensity') | float(-1) > 0 %} + {% if condition | contains('rain') + or condition | contains('pouring') + or condition | contains('storm') + or condition | contains('lightning') + or condition | contains('hail') %} rain + {% elif is_state('binary_sensor.freezing', 'off') %} rain {% else %} snow {% endif %} {% else %} none {% endif %} - availability: "{{ has_value('sensor.current_condition') }}" - name: "Precipitation Type Expected" unique_id: precipitation_type_expected @@ -1503,26 +1501,28 @@ state: > {% set type = namespace(value=none) %} {% set forecast = state_attr('sensor.hourly_weather', 'forecast') %} - {% for item in forecast %} - {% if item.condition | contains('rain') - or item.condition | contains('pouring') - or item.condition | contains('storm') - or item.condition | contains('lightning') - or item.condition | contains('hail') %} - {% set type.value = 'rain' %} - {% break %} - {% elif item.condition | contains('snow') %} - {% set type.value = 'snow' %} - {% break %} + {% if forecast != none %} + {% for item in forecast %} + {% if loop.index0 < 24 %} + {% if item.condition | contains('rain') + or item.condition | contains('pouring') + or item.condition | contains('storm') + or item.condition | contains('lightning') + or item.condition | contains('hail') %} + {% set type.value = 'rain' %} + {% break %} + {% elif item.condition | contains('snow') %} + {% set type.value = 'snow' %} + {% break %} + {% endif %} + {% else %} {% break %} {% endif %} {% endfor %} + {% endif %} {% if type.value == none %} {% set type.value = 'snow' if is_state('binary_sensor.freezing', 'on') else 'rain' %} {% endif %} {{ type.value }} - availability: > - {{ states.sensor.hourly_weather.attributes is defined - and states.sensor.hourly_weather.attributes.forecast is defined }} - name: "Precipitation Start" # next 24 hours unique_id: precipitation_start @@ -1549,7 +1549,7 @@ {{ as_timestamp(time.value) | timestamp_utc if time.value != none else none }} attributes: 12hour: > - {% from 'speech_helpers.jinja' import twelve_hour %} + {% from 'schedule.jinja' import twelve_hour %} {{ twelve_hour(this.entity_id) }} provider: "Environment Canada" # more accurate that pirate, not synced with forecast sensor availability: "{{ state_attr('sensor.hourly_envcan', 'forecast') not in ['', none] }}" diff --git a/ui-debug.yaml b/ui-debug.yaml index 246569072..e1c7a4230 100644 --- a/ui-debug.yaml +++ b/ui-debug.yaml @@ -5,3 +5,4 @@ title: "Debug" views: - !include ui/dashboard/debug/debugging.yaml - !include ui/dashboard/debug/debugging2.yaml + - !include ui/dashboard/debug/test.yaml \ No newline at end of file diff --git a/ui-lovelace.yaml b/ui-lovelace.yaml index 0ff6177a0..c258cda8c 100644 --- a/ui-lovelace.yaml +++ b/ui-lovelace.yaml @@ -21,6 +21,9 @@ views: # other - !include /config/ui/dashboard/subview/other/sprinklers.yaml + # media + - !include /config/ui/dashboard/subview/media/mass.yaml + # light - !include /config/ui/dashboard/subview/light/adaptive_lighting_graph.yaml diff --git a/ui/button/other/hass.yaml b/ui/button/other/hass.yaml index e9c30aa2f..67a270c9d 100644 --- a/ui/button/other/hass.yaml +++ b/ui/button/other/hass.yaml @@ -65,7 +65,7 @@ double_tap_action: action: navigate navigation_path: /ui-hass/hass hold_action: - action: call-service + action: perform-action service: input_boolean.turn_off service_data: entity_id: diff --git a/ui/button/presence/charlie.yaml b/ui/button/presence/charlie.yaml index 058a42c48..4d69e970f 100644 --- a/ui/button/presence/charlie.yaml +++ b/ui/button/presence/charlie.yaml @@ -3,7 +3,8 @@ ############################################################################### type: custom:button-card template: menu_button -entity: input_boolean.charlie_home +entity: device_tracker.charlie_pebblebee_ble +icon: mdi:dog-side tap_action: action: fire-dom-event browser_mod: diff --git a/ui/card/bluetooth/bluetooth_devices.yaml b/ui/card/bluetooth/bluetooth_devices.yaml index cbfef599f..035655490 100644 --- a/ui/card/bluetooth/bluetooth_devices.yaml +++ b/ui/card/bluetooth/bluetooth_devices.yaml @@ -4,9 +4,7 @@ type: custom:auto-entities filter: include: - - domain: device_tracker - attributes: - device_type: bluetooth + - group: group.bluetooth_le_devices options: secondary_info: last-changed sort: diff --git a/ui/card/bluetooth/bluetooth_le_devices.yaml b/ui/card/bluetooth/bluetooth_le_devices.yaml index 2bab4022f..a5fc0807c 100644 --- a/ui/card/bluetooth/bluetooth_le_devices.yaml +++ b/ui/card/bluetooth/bluetooth_le_devices.yaml @@ -1,12 +1,10 @@ ############################################################################### -## Bluetooth Devices +## Bluetooth LE Devices ############################################################################### type: custom:auto-entities filter: include: - - domain: device_tracker - attributes: - device_type: bluetooth_le + - group: group.bluetooth_devices options: secondary_info: last-changed sort: diff --git a/ui/card/bluetooth/include/bluetooth_devices.yaml b/ui/card/bluetooth/include/bluetooth_devices.yaml index f3d6d1611..c5b53d3d1 100644 --- a/ui/card/bluetooth/include/bluetooth_devices.yaml +++ b/ui/card/bluetooth/include/bluetooth_devices.yaml @@ -4,9 +4,7 @@ type: custom:auto-entities filter: include: - - domain: device_tracker - attributes: - device_type: bluetooth + - group: group.bluetooth_devices options: secondary_info: last-changed sort: diff --git a/ui/card/bluetooth/include/bluetooth_le_devices.yaml b/ui/card/bluetooth/include/bluetooth_le_devices.yaml index 61cbf6b5c..c4b33dba8 100644 --- a/ui/card/bluetooth/include/bluetooth_le_devices.yaml +++ b/ui/card/bluetooth/include/bluetooth_le_devices.yaml @@ -4,9 +4,7 @@ type: custom:auto-entities filter: include: - - domain: device_tracker - attributes: - device_type: bluetooth_le + - group: group.bluetooth_le_devices options: secondary_info: last-changed sort: diff --git a/ui/card/hass/device_monitor.yaml b/ui/card/hass/device_monitor.yaml index 15b2d8fbe..a2e0a2b70 100644 --- a/ui/card/hass/device_monitor.yaml +++ b/ui/card/hass/device_monitor.yaml @@ -51,23 +51,6 @@ entities: {% from 'style.jinja' import alert_non_zero_style %} {{ alert_non_zero_style('sensor.unavailable_entities_filtered') }} - - type: custom:auto-entities - show_empty: true - unique: true - filter: - template: "{{ state_attr('group.unavailable_entities_filtered2', 'entity_id') }}" - sort: - method: state - card: - type: custom:fold-entity-row - padding: 0 - head: - entity: sensor.unavailable_entities_filtered2 #TEST - card_mod: - style: | - {% from 'style.jinja' import alert_non_zero_style %} - {{ alert_non_zero_style('sensor.unavailable_entities_filtered') }} - - type: custom:auto-entities show_empty: true unique: true @@ -81,22 +64,8 @@ entities: head: entity: sensor.unavailable_entities - - type: custom:auto-entities - show_empty: true - unique: true - filter: - template: "{{ state_attr('group.unavailable_entities2', 'entity_id') }}" - sort: - method: state - card: - type: custom:fold-entity-row - padding: 0 - head: - entity: sensor.unavailable_entities2 #TEST - - sensor.unavailable_devices_plus #TEST - sensor.unavailable_devices #TEST - - sensor.disabled_device_entities #TEST - type: custom:fold-entity-row padding: 0 diff --git a/ui/card/network/pi_hole.yaml b/ui/card/network/pi_hole.yaml index bd7579200..b7a4d287f 100644 --- a/ui/card/network/pi_hole.yaml +++ b/ui/card/network/pi_hole.yaml @@ -85,15 +85,3 @@ entities: tap_action: action: url url_path: !secret PIHOLE_ADMIN - - # - type: custom:state-switch #TODO error with 2024.1.0 - # entity: deviceID - # states: - # 1bbba1aa-fd7f3432: # jlaptop_chrome_internal - # type: button - # entity: binary_sensor.pi_hole_status - # name: "Pi-Hole Admin" - # action_name: "VIEW" - # tap_action: - # action: url - # url_path: !secret PIHOLE_ADMIN \ No newline at end of file diff --git a/ui/card/presence/charlie_settings.yaml b/ui/card/presence/charlie_settings.yaml index 28855b5b6..9a2fba1f5 100644 --- a/ui/card/presence/charlie_settings.yaml +++ b/ui/card/presence/charlie_settings.yaml @@ -6,6 +6,8 @@ title: "Charlie Settings" show_header_toggle: false state_color: true entities: + - entity: device_tracker.charlie_pebblebee_ble #TEST + - entity: input_boolean.charlie_home - type: custom:fold-entity-row diff --git a/ui/card/weather/include/precipitation_entities.yaml b/ui/card/weather/include/precipitation_entities.yaml index 54b9d7fb6..e4080825b 100644 --- a/ui/card/weather/include/precipitation_entities.yaml +++ b/ui/card/weather/include/precipitation_entities.yaml @@ -156,6 +156,10 @@ > #HACK 'None' contains ALT-0173 (blank char to prevent render as none) {% set intensity = states('sensor.precipitation_intensity_text') %} {{ 'NoneĀ­' if intensity == 'none' else intensity | title }} + card_mod: + style: > + {% from 'weather.jinja' import precipitation_intensity_color %} + {{ precipitation_intensity_color(states('sensor.precipitation_intensity')) }} - type: conditional conditions: diff --git a/ui/card/weather/include/wind_entities.yaml b/ui/card/weather/include/wind_entities.yaml index f5aa24807..190b1a959 100644 --- a/ui/card/weather/include/wind_entities.yaml +++ b/ui/card/weather/include/wind_entities.yaml @@ -19,6 +19,10 @@ - entity: sensor.wind_speed_24_hour_average name: "Average Last 24 Hours" + card_mod: + style: > + {% from 'weather.jinja' import wind_color %} + {{ wind_color(states('sensor.wind_speed_24_hour_average')) }} - entity: sensor.wind_gust name: "Gust" diff --git a/ui/card/weather/today_forecast.yaml b/ui/card/weather/today_forecast.yaml index 9c2cc9400..56502e752 100644 --- a/ui/card/weather/today_forecast.yaml +++ b/ui/card/weather/today_forecast.yaml @@ -90,41 +90,60 @@ entities: {% from 'weather.jinja' import pop_color %} {{ pop_color(states('sensor.precipitation_probability_today')) }} entities: - - entity: sensor.max_precipitation_intensity_today - name: "Maximum Precipitation Rate" - - - entity: sensor.rain_expected_today - name: "Rain" - card_mod: - style: | - :host { - --paper-item-icon-color: - {% if states('sensor.rain_expected_today') | float(-1) > 0 %} var(--entity-rain-color) - {% endif %} - ; - } - - - entity: sensor.snow_expected_today - name: "Snow" - card_mod: - style: | - :host { - --paper-item-icon-color: - {% if states('sensor.snow_expected_today') | float(-1) > 0 %} var(--entity-snow-color) - {% endif %} - ; - } - - - entity: sensor.ice_expected_today - name: "Ice" - card_mod: - style: | - :host { - --paper-item-icon-color: - {% if states('sensor.ice_expected_today') | float(-1) > 0 %} var(--entity-ice-color) - {% endif %} - ; - } + - type: conditional + conditions: + - condition: numeric_state + entity: sensor.max_precipitation_intensity_today + above: 0 + row: + entity: sensor.max_precipitation_intensity_today + name: "Maximum Precipitation Rate" + card_mod: + style: > + {% from 'weather.jinja' import precipitation_intensity_color %} + {{ precipitation_intensity_color(states('sensor.max_precipitation_intensity_today')) }} + + - type: conditional + conditions: + - condition: numeric_state + entity: sensor.rain_expected_today + above: 0 + row: + entity: sensor.rain_expected_today + name: "Rain" + card_mod: + style: | + :host { + --paper-item-icon-color: var(--entity-rain-color); + } + + - type: conditional + conditions: + - condition: numeric_state + entity: sensor.snow_expected_today + above: 0 + row: + entity: sensor.snow_expected_today + name: "Snow" + card_mod: + style: | + :host { + --paper-item-icon-color: var(--entity-snow-color); + } + + - type: conditional + conditions: + - condition: numeric_state + entity: sensor.ice_expected_today + above: 0 + row: + entity: sensor.ice_expected_today + name: "Ice" + card_mod: + style: | + :host { + --paper-item-icon-color: var(--entity-ice-color); + } - type: custom:template-entity-row entity: sensor.uv_risk_today diff --git a/ui/card/weather/tomorrow_forecast.yaml b/ui/card/weather/tomorrow_forecast.yaml index f3222dfb1..f78c3c96d 100644 --- a/ui/card/weather/tomorrow_forecast.yaml +++ b/ui/card/weather/tomorrow_forecast.yaml @@ -90,41 +90,60 @@ entities: {% from 'weather.jinja' import pop_color %} {{ pop_color(states('sensor.precipitation_probability_tomorrow')) }} entities: - - entity: sensor.max_precipitation_intensity_tomorrow - name: "Maximum Precipitation Rate" - - - entity: sensor.rain_expected_tomorrow - name: "Rain" - card_mod: - style: | - :host { - --paper-item-icon-color: - {% if states('sensor.rain_expected_tomorrow') | float(-1) > 0 %} var(--entity-rain-color) - {% endif %} - ; - } - - - entity: sensor.snow_expected_tomorrow - name: "Snow" - card_mod: - style: | - :host { - --paper-item-icon-color: - {% if states('sensor.snow_expected_tomorrow') | float(-1) > 0 %} var(--entity-snow-color) - {% endif %} - ; - } - - - entity: sensor.ice_expected_tomorrow - name: "Ice" - card_mod: - style: | - :host { - --paper-item-icon-color: - {% if states('sensor.ice_expected_tomorrow') | float(-1) > 0 %} var(--entity-ice-color) - {% endif %} - ; - } + - type: conditional + conditions: + - condition: numeric_state + entity: sensor.max_precipitation_intensity_tomorrow + above: 0 + row: + entity: sensor.max_precipitation_intensity_tomorrow + name: "Maximum Precipitation Rate" + card_mod: + style: > + {% from 'weather.jinja' import precipitation_intensity_color %} + {{ precipitation_intensity_color(states('sensor.max_precipitation_intensity_tomorrow')) }} + + - type: conditional + conditions: + - condition: numeric_state + entity: sensor.rain_expected_tomorrow + above: 0 + row: + entity: sensor.rain_expected_tomorrow + name: "Rain" + card_mod: + style: | + :host { + --paper-item-icon-color: var(--entity-rain-color); + } + + - type: conditional + conditions: + - condition: numeric_state + entity: sensor.snow_expected_tomorrow + above: 0 + row: + entity: sensor.snow_expected_tomorrow + name: "Snow" + card_mod: + style: | + :host { + --paper-item-icon-color: var(--entity-snow-color); + } + + - type: conditional + conditions: + - condition: numeric_state + entity: sensor.ice_expected_tomorrow + above: 0 + row: + entity: sensor.ice_expected_tomorrow + name: "Ice" + card_mod: + style: | + :host { + --paper-item-icon-color: var(--entity-ice-color); + } - type: custom:template-entity-row entity: sensor.fire_index_tomorrow diff --git a/ui/dashboard/debug/test.yaml b/ui/dashboard/debug/test.yaml new file mode 100644 index 000000000..6a8d62baf --- /dev/null +++ b/ui/dashboard/debug/test.yaml @@ -0,0 +1,22 @@ +############################################################################### +## Testing View +############################################################################### +title: "Test" +icon: mdi:ab-testing +path: test +cards: + - type: history-graph + title: "Oudoor Dew Point" + hours_to_show: 1 + show_names: true + entities: + - sensor.dew_point + - sensor.outdoor_dew_point_test + + - type: history-graph + title: "Indoor Dew Point" + hours_to_show: 1 + show_names: true + entities: + - sensor.indoor_dew_point + - sensor.indoor_dew_point_test \ No newline at end of file diff --git a/ui/dashboard/mobile/home.yaml b/ui/dashboard/mobile/home.yaml index ee09e33ec..1c212cce0 100644 --- a/ui/dashboard/mobile/home.yaml +++ b/ui/dashboard/mobile/home.yaml @@ -14,6 +14,7 @@ cards: - !include /config/ui/card/scene/scene_timers.yaml - !include /config/ui/button/layout/media.yaml + - !include /config/ui/button/layout/media_preset.yaml - type: conditional conditions: diff --git a/ui/dashboard/mobile/media.yaml b/ui/dashboard/mobile/media.yaml index f136dbb0c..aa478f92d 100644 --- a/ui/dashboard/mobile/media.yaml +++ b/ui/dashboard/mobile/media.yaml @@ -8,6 +8,7 @@ cards: - !include /config/ui/card/alarm/alarm_alert.yaml - !include /config/ui/menu/media.yaml - !include /config/ui/button/layout/media.yaml + - !include /config/ui/button/layout/media_preset.yaml - type: conditional conditions: diff --git a/ui/dashboard/subview/camera/security_cameras.yaml b/ui/dashboard/subview/camera/security_cameras.yaml index f4ce63f50..4915a648d 100644 --- a/ui/dashboard/subview/camera/security_cameras.yaml +++ b/ui/dashboard/subview/camera/security_cameras.yaml @@ -4,113 +4,101 @@ title: "Security Cameras" path: security-cameras subview: true -type: sections -sections: - - type: grid - column_span: 3 - cards: - - type: vertical-stack - grid_options: - columns: full - cards: - - type: grid - columns: 4 - square: false - cards: - - type: conditional - conditions: - - condition: state - entity: camera.side_driveway - state_not: unavailable - card: !include /config/ui/card/camera/security/side_driveway.yaml +cards: + - type: conditional + conditions: + - condition: state + entity: camera.side_driveway + state_not: unavailable + card: !include /config/ui/card/camera/security/side_driveway.yaml - - type: conditional - conditions: - - condition: state - entity: camera.side_door - state_not: unavailable - card: !include /config/ui/card/camera/security/side_door.yaml + - type: conditional + conditions: + - condition: state + entity: camera.side_door + state_not: unavailable + card: !include /config/ui/card/camera/security/side_door.yaml - - type: conditional - conditions: - - condition: state - entity: camera.front_driveway - state_not: unavailable - card: !include /config/ui/card/camera/security/front_driveway.yaml + - type: conditional + conditions: + - condition: state + entity: camera.front_driveway + state_not: unavailable + card: !include /config/ui/card/camera/security/front_driveway.yaml - - type: conditional - conditions: - - condition: state - entity: camera.front_door - state_not: unavailable - card: !include /config/ui/card/camera/security/front_door.yaml + - type: conditional + conditions: + - condition: state + entity: camera.front_door + state_not: unavailable + card: !include /config/ui/card/camera/security/front_door.yaml - - type: conditional - conditions: - - condition: state - entity: camera.front_yard - state_not: unavailable - card: !include /config/ui/card/camera/security/front_yard.yaml + - type: conditional + conditions: + - condition: state + entity: camera.front_yard + state_not: unavailable + card: !include /config/ui/card/camera/security/front_yard.yaml - - type: conditional - conditions: - - condition: state - entity: camera.side_gate_front - state_not: unavailable - card: !include /config/ui/card/camera/security/side_gate_front.yaml + - type: conditional + conditions: + - condition: state + entity: camera.side_gate_front + state_not: unavailable + card: !include /config/ui/card/camera/security/side_gate_front.yaml - - type: conditional - conditions: - - condition: state - entity: camera.side_gate_back - state_not: unavailable - card: !include /config/ui/card/camera/security/side_gate_back.yaml + - type: conditional + conditions: + - condition: state + entity: camera.side_gate_back + state_not: unavailable + card: !include /config/ui/card/camera/security/side_gate_back.yaml - - type: conditional - conditions: - - condition: state - entity: camera.back_yard - state_not: unavailable - card: !include /config/ui/card/camera/security/back_yard.yaml + - type: conditional + conditions: + - condition: state + entity: camera.back_yard + state_not: unavailable + card: !include /config/ui/card/camera/security/back_yard.yaml - - type: conditional - conditions: - - condition: state - entity: camera.back_door - state_not: unavailable - card: !include /config/ui/card/camera/security/back_door.yaml + - type: conditional + conditions: + - condition: state + entity: camera.back_door + state_not: unavailable + card: !include /config/ui/card/camera/security/back_door.yaml - - type: conditional - conditions: - - condition: state - entity: camera.patio_door - state_not: unavailable - card: !include /config/ui/card/camera/security/patio_door.yaml + - type: conditional + conditions: + - condition: state + entity: camera.patio_door + state_not: unavailable + card: !include /config/ui/card/camera/security/patio_door.yaml - - type: conditional - conditions: - - condition: state - entity: camera.back_house - state_not: unavailable - card: !include /config/ui/card/camera/security/back_house.yaml + - type: conditional + conditions: + - condition: state + entity: camera.back_house + state_not: unavailable + card: !include /config/ui/card/camera/security/back_house.yaml - - type: conditional - conditions: - - condition: state - entity: camera.garage_inside - state_not: unavailable - card: !include /config/ui/card/camera/security/garage_inside.yaml + - type: conditional + conditions: + - condition: state + entity: camera.garage_inside + state_not: unavailable + card: !include /config/ui/card/camera/security/garage_inside.yaml - - type: conditional - conditions: - - condition: state - entity: camera.living_room - state_not: unavailable - card: !include /config/ui/card/camera/security/living_room.yaml + - type: conditional + conditions: + - condition: state + entity: camera.living_room + state_not: unavailable + card: !include /config/ui/card/camera/security/living_room.yaml - - type: conditional - conditions: - - condition: state - entity: camera.charlie_cam - state_not: unavailable - card: !include /config/ui/card/camera/security/charlie_cam.yaml + - type: conditional + conditions: + - condition: state + entity: camera.charlie_cam + state_not: unavailable + card: !include /config/ui/card/camera/security/charlie_cam.yaml diff --git a/ui/dashboard/subview/media/mass.yaml b/ui/dashboard/subview/media/mass.yaml new file mode 100644 index 000000000..6ad05ae30 --- /dev/null +++ b/ui/dashboard/subview/media/mass.yaml @@ -0,0 +1,21 @@ +title: "Music Assistant" +path: mass +type: sections +subview: true +max_columns: 3 +dense_section_placement: true +sections: + - type: grid + cards: + - !include /config/ui/card/media/media_player/media_players_group.yaml + + - type: grid + cards: + - !include /config/ui/card/media/media_player/media_players_speaker.yaml + + - type: grid + cards: + - type: iframe + grid_options: + rows: 12 + url: http://homeassistant.local:8095/#/playlists?frameless=true?player=3a1d7fed_11ce_d548_e71f_81de2a81e2d2 \ No newline at end of file diff --git a/ui/graph/weather/precipitation_detail.yaml b/ui/graph/weather/precipitation_detail.yaml index c852b70ca..b140a2a2c 100644 --- a/ui/graph/weather/precipitation_detail.yaml +++ b/ui/graph/weather/precipitation_detail.yaml @@ -94,7 +94,7 @@ yaxis: series: - entity: sensor.daily_weather name: "Expected" - yaxis_id: precip2 + yaxis_id: precip #TODO precip2? type: column float_precision: 1 group_by: @@ -112,7 +112,7 @@ series: }); - entity: sensor.ice_accumulation_today - name: "Ice" + name: "Ice (mm)" yaxis_id: precip type: column statistics: @@ -131,7 +131,7 @@ series: color: rgb(120, 48, 116) - entity: sensor.snow_accumulation_today - name: "Snow" + name: "Snow (cm)" yaxis_id: precip type: column statistics: @@ -150,7 +150,7 @@ series: color: rgb(27, 147, 227) - entity: sensor.rain_accumulation_today - name: "Rain" + name: "Rain (mm)" yaxis_id: precip type: column statistics: diff --git a/ui/history/weather/precipitation_today.yaml b/ui/history/weather/precipitation_today.yaml index 2b641e0f8..7075b00ae 100644 --- a/ui/history/weather/precipitation_today.yaml +++ b/ui/history/weather/precipitation_today.yaml @@ -6,14 +6,14 @@ title: "Precipitation Today" hours_to_show: 240 show_names: true entities: - # - entity: sensor.rain_accumulation_today - # name: "Rain" + - entity: sensor.rain_accumulation_today + name: "Rain" - # - entity: sensor.snow_accumulation_today #TODO cm -> mm? - # name: "Snow" + - entity: sensor.snow_accumulation_today + name: "Snow" - # - entity: sensor.ice_accumulation_today - # name: "Ice" + - entity: sensor.ice_accumulation_today + name: "Ice" - entity: sensor.precipitation_accumulation_today name: "Precipitation" diff --git a/ui/iframe/mass_playlists.yaml b/ui/iframe/mass_playlists.yaml new file mode 100644 index 000000000..0bc7723ab --- /dev/null +++ b/ui/iframe/mass_playlists.yaml @@ -0,0 +1,7 @@ +############################################################################### +## Music Assistant I-Frame +############################################################################### +type: iframe +grid_options: + rows: 12 +url: http://homeassistant.local:8095/#/playlists?frameless=true?player=true \ No newline at end of file diff --git a/ui/statistics_graph/outdoor_humidity.yaml b/ui/statistics_graph/outdoor_humidity.yaml index 8ddf5ebca..24f98713e 100644 --- a/ui/statistics_graph/outdoor_humidity.yaml +++ b/ui/statistics_graph/outdoor_humidity.yaml @@ -7,6 +7,8 @@ chart_type: line hide_legend: false stat_types: - mean + - max + - min logarithmic_scale: false days_to_show: 1095 period: month