Compare commits

...

4 Commits

Author SHA1 Message Date
zorruno 85ee5e96d0 bathroom timer add 2026-06-28 00:09:07 +12:00
ESPHome Device Builder 15e9903b91 Edit esp-entrancebathrmlights.yaml 2026-06-28 00:02:28 +12:00
ESPHome Device Builder 9342616e33 Edit esp-entrancebathrmlights.yaml 2026-06-27 23:57:17 +12:00
ESPHome Device Builder dc827a3228 Edit esp-entrancebathrmlights.yaml 2026-06-27 23:23:31 +12:00
5 changed files with 3148 additions and 356 deletions
+1 -1
View File
@@ -1 +1 @@
{"pid": 71, "version": 1, "ha_version": "2026.6.4", "start_ts": 1782291758.7869737} {"pid": 70, "version": 1, "ha_version": "2026.6.4", "start_ts": 1782378461.6707728}
+2850 -250
View File
File diff suppressed because it is too large Load Diff
+151 -3
View File
@@ -6,6 +6,8 @@
# https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-entrancebathrmlights.yaml # https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-entrancebathrmlights.yaml
#:########################################################################################:# #:########################################################################################:#
# VERSIONS: # VERSIONS:
# V4.1 2026-06-27 Changed fan timer back to MM:SS with 1 second countdown and 00:00 when fan is off
# V4.0 2026-06-27 Added extract fan timer enable switch and countdown sensor
# V3.9 2026-03-11 Updated yaml to zorruno layout V1.1 # V3.9 2026-03-11 Updated yaml to zorruno layout V1.1
# V3.8 2026-02-25 Updated yaml to zorruno layout V1.1 # V3.8 2026-02-25 Updated yaml to zorruno layout V1.1
# V3.7 2025-09-34 Upload to this bathroom (as noted in original header) # V3.7 2025-09-34 Upload to this bathroom (as noted in original header)
@@ -21,16 +23,29 @@
# - Entrance bathroom switch with 2 outputs: # - Entrance bathroom switch with 2 outputs:
# 1) Main Lights # 1) Main Lights
# 2) Extract Fan # 2) Extract Fan
#
# - Optional extract fan timer:
# - Controlled by the "Fan Timer Enabled" switch.
# - When enabled, if the light is OFF and the fan is ON, the fan will run for the
# configured fan_timer_duration_minutes, then turn OFF.
# - Countdown starts when the light turns OFF while the fan is ON.
# - Countdown also starts when the fan turns ON while the light is already OFF.
# - Countdown is cancelled/reset if the light turns ON or the fan turns OFF manually.
# - The timer remaining sensor shows MM:SS while counting down.
# - When the fan is OFF, the timer remaining sensor shows 00:00.
#:########################################################################################:# #:########################################################################################:#
# OFFLINE NOTES: # OFFLINE NOTES:
# a) Home Assistant OFFLINE, but Network and MQTT ONLINE # a) Home Assistant OFFLINE, but Network and MQTT ONLINE
# - Local button control continues to toggle relays. # - Local button control continues to toggle relays.
# - Fan timer logic continues locally on the ESP device.
# - MQTT/API publishing to HA may not be available until HA returns. # - MQTT/API publishing to HA may not be available until HA returns.
# b) MQTT OFFLINE (or broker unreachable) # b) MQTT OFFLINE (or broker unreachable)
# - Local button control continues to toggle relays. # - Local button control continues to toggle relays.
# - Fan timer logic continues locally on the ESP device.
# - MQTT state updates (if any) will not publish. # - MQTT state updates (if any) will not publish.
# c) Entire WiFi/Network OFFLINE # c) Entire WiFi/Network OFFLINE
# - Local button control continues to toggle relays. # - Local button control continues to toggle relays.
# - Fan timer logic continues locally on the ESP device.
# - Accurate time is NOT needed (SNTP not needed). # - Accurate time is NOT needed (SNTP not needed).
#:########################################################################################:# #:########################################################################################:#
@@ -42,12 +57,12 @@ substitutions:
# Device Naming # Device Naming
device_name: "esp-entrancebathrmlights" device_name: "esp-entrancebathrmlights"
friendly_name: "Entrance Bathroom Lightswitch (2)" friendly_name: "Entrance Bathroom Lightswitch (2)"
description_comment: "Entrance bathroom lightswitch using a Zemismart KS-811 Double Push Button. Main Lights (1), Extract Fan (2) (Layout V1.1)" description_comment: "Entrance bathroom lightswitch using a Zemismart KS-811 Double Push Button. Main Lights (1), Extract Fan (2), Fan Timer (Layout V1.1)"
device_area: "Entranceway" # Allows ESP device to be automatically linked to an 'Area' in Home Assistant. device_area: "Entranceway" # Allows ESP device to be automatically linked to an 'Area' in Home Assistant.
# Project Naming # Project Naming
project_name: "Zemismart Technologies.KS-811 Double" project_name: "Zemismart Technologies.KS-811 Double"
project_version: "v3.9" project_version: "v4.1"
# Passwords & Secrets # Passwords & Secrets
api_key: !secret esp-api_key # unfortunately you can't use substitutions inside secrets names api_key: !secret esp-api_key # unfortunately you can't use substitutions inside secrets names
@@ -66,6 +81,9 @@ substitutions:
switch_1_name: "Main Lights" switch_1_name: "Main Lights"
switch_2_name: "Extract Fan" switch_2_name: "Extract Fan"
# Fan Timer Settings
fan_timer_duration_minutes: "10"
#:########################################################################################:# #:########################################################################################:#
# PACKAGES: Included Common Packages # PACKAGES: Included Common Packages
# https://esphome.io/components/packages.html # https://esphome.io/components/packages.html
@@ -146,6 +164,21 @@ status_led:
number: GPIO2 number: GPIO2
inverted: true inverted: true
#:########################################################################################:#
# GLOBALS
# https://esphome.io/components/globals.html
#:########################################################################################:#
globals:
- id: fan_timer_counting_down
type: bool
restore_value: false
initial_value: "false"
- id: fan_timer_remaining_seconds
type: int
restore_value: false
initial_value: "0"
#:########################################################################################:# #:########################################################################################:#
# BINARY SENSORS # BINARY SENSORS
# https://esphome.io/components/binary_sensor/ # https://esphome.io/components/binary_sensor/
@@ -175,12 +208,127 @@ binary_sensor:
# https://esphome.io/components/switch/ # https://esphome.io/components/switch/
#:########################################################################################:# #:########################################################################################:#
switch: switch:
- platform: template
name: "Fan Timer Enabled"
id: fan_timer_enabled
icon: "mdi:fan-clock"
optimistic: true
restore_mode: RESTORE_DEFAULT_ON
entity_category: config
turn_on_action:
- script.execute: fan_timer_evaluate
turn_off_action:
- script.execute: fan_timer_cancel
- platform: gpio - platform: gpio
name: "Relay 1: ${switch_1_name}" name: "Relay 1: ${switch_1_name}"
pin: GPIO13 pin: GPIO13
id: Relay_1 id: Relay_1
on_turn_on:
- script.execute: fan_timer_evaluate
on_turn_off:
- script.execute: fan_timer_evaluate
- platform: gpio - platform: gpio
name: "Relay 2: ${switch_2_name}" name: "Relay 2: ${switch_2_name}"
pin: GPIO12 pin: GPIO12
id: Relay_2 id: Relay_2
on_turn_on:
- script.execute: fan_timer_evaluate
on_turn_off:
- script.execute: fan_timer_evaluate
#:########################################################################################:#
# TEXT SENSORS
# https://esphome.io/components/text_sensor/
#:########################################################################################:#
text_sensor:
- platform: template
name: "Fan Timer Remaining"
id: fan_timer_remaining_text
icon: "mdi:timer-outline"
update_interval: 1s
lambda: |-
int seconds = 0;
// Only show the countdown while the timer is actually operating.
// If the timer is not operating, always show 00:00.
if (id(fan_timer_counting_down)) {
seconds = id(fan_timer_remaining_seconds);
}
if (seconds < 0) {
seconds = 0;
}
int mins = seconds / 60;
int secs = seconds % 60;
char buffer[8];
snprintf(buffer, sizeof(buffer), "%02d:%02d", mins, secs);
return std::string(buffer);
#:########################################################################################:#
# SCRIPTS
# https://esphome.io/components/script.html
#:########################################################################################:#
script:
- id: fan_timer_cancel
mode: restart
then:
- lambda: |-
id(fan_timer_counting_down) = false;
id(fan_timer_remaining_seconds) = 0;
- component.update: fan_timer_remaining_text
- id: fan_timer_evaluate
mode: restart
then:
- if:
condition:
lambda: |-
return id(fan_timer_enabled).state && !id(Relay_1).state && id(Relay_2).state;
then:
- lambda: |-
id(fan_timer_remaining_seconds) = ${fan_timer_duration_minutes} * 60;
id(fan_timer_counting_down) = true;
- component.update: fan_timer_remaining_text
else:
- script.execute: fan_timer_cancel
#:########################################################################################:#
# INTERVALS
# https://esphome.io/components/interval.html
#:########################################################################################:#
interval:
- interval: 1s
then:
- if:
condition:
lambda: |-
return id(fan_timer_counting_down);
then:
- if:
condition:
lambda: |-
return id(fan_timer_enabled).state && !id(Relay_1).state && id(Relay_2).state;
then:
- lambda: |-
if (id(fan_timer_remaining_seconds) > 0) {
id(fan_timer_remaining_seconds) -= 1;
}
- component.update: fan_timer_remaining_text
- if:
condition:
lambda: |-
return id(fan_timer_remaining_seconds) <= 0;
then:
- lambda: |-
id(fan_timer_counting_down) = false;
id(fan_timer_remaining_seconds) = 0;
- component.update: fan_timer_remaining_text
- switch.turn_off: Relay_2
else:
- script.execute: fan_timer_cancel
+1 -1
View File
@@ -245,7 +245,7 @@ script:
heatpump_climate_entity: climate.lounge heatpump_climate_entity: climate.lounge
gas_heater_shutdown_delay_seconds: 60 gas_heater_shutdown_delay_seconds: 60
heatpump_setpoint_offset_c: -5 heatpump_setpoint_offset_c: -0.5
heatpump_setpoint: >- heatpump_setpoint: >-
{{ {{
+145 -101
View File
@@ -1,34 +1,36 @@
# ===================================================================== #:########################################################################################:#
# Home Assistant Summary - package # Home Assistant Summary Package - V2 #
#:########################################################################################:#
# #
# Counts: # Uses V2 entity IDs to avoid stale/ghost entities from earlier versions.
# - Total devices/entities/broken entities #
# - Cameras, areas, scenes, scripts, automations # Dashboard entity prefix:
# - ESPHome devices/entities # sensor.ha_summary_v2_...
# - Tasmota devices/entities
# - Zigbee ZHA devices/entities
# - Zigbee2MQTT devices/entities
# - Matter devices/entities
# - Matter Wi-Fi/Ethernet devices/entities - best effort
# - Matter Thread devices/entities - best effort
# - Matter unclassified devices/entities
# - Cloud-ish devices/entities
# - Supervisor add-ons - approximate
# - Updates available
# #
# Important:
# - This uses only modern template: syntax.
# - There must be no root-level:
# sensor:
# - platform: template
# in this package.
# =====================================================================
template: template:
- sensor: - trigger:
# ---------- Totals and basics ---------- - platform: event
- name: HA Summary - devices total event_type: homeassistant_started
unique_id: ha_summary_devices_total - platform: event
event_type: entity_registry_updated
- platform: event
event_type: device_registry_updated
- platform: event
event_type: area_registry_updated
- platform: event
event_type: core_config_updated
- platform: time_pattern
minutes: "/5"
sensor:
#:####################################################################################:#
# Core summary
#:####################################################################################:#
- name: HA Summary V2 - devices total
unique_id: ha_summary_v2_devices_total
default_entity_id: sensor.ha_summary_v2_devices_total
unit_of_measurement: "devices" unit_of_measurement: "devices"
state: >- state: >-
{% set ids = namespace(v=[]) %} {% set ids = namespace(v=[]) %}
@@ -40,42 +42,53 @@ template:
{% endfor %} {% endfor %}
{{ ids.v | length }} {{ ids.v | length }}
- name: HA Summary - entities total - name: HA Summary V2 - entities total
unique_id: ha_summary_entities_total unique_id: ha_summary_v2_entities_total
default_entity_id: sensor.ha_summary_v2_entities_total
unit_of_measurement: "entities" unit_of_measurement: "entities"
state: "{{ states | list | length }}" state: "{{ states | list | length }}"
- name: HA Summary - entities broken - name: HA Summary V2 - entities broken
unique_id: ha_summary_entities_broken unique_id: ha_summary_v2_entities_broken
default_entity_id: sensor.ha_summary_v2_entities_broken
unit_of_measurement: "entities" unit_of_measurement: "entities"
state: >- state: >-
{{ states | selectattr('state','in',['unavailable','unknown']) | list | length }} {{ states | selectattr('state','in',['unavailable','unknown']) | list | length }}
- name: HA Summary - cameras - name: HA Summary V2 - cameras
unique_id: ha_summary_cameras unique_id: ha_summary_v2_cameras
default_entity_id: sensor.ha_summary_v2_cameras
unit_of_measurement: "cameras" unit_of_measurement: "cameras"
state: "{{ states.camera | list | length }}" state: "{{ states.camera | list | length }}"
- name: HA Summary - areas - name: HA Summary V2 - areas
unique_id: ha_summary_areas unique_id: ha_summary_v2_areas
default_entity_id: sensor.ha_summary_v2_areas
unit_of_measurement: "areas" unit_of_measurement: "areas"
state: "{{ areas() | list | length }}" state: "{{ areas() | list | length }}"
- name: HA Summary - scenes - name: HA Summary V2 - scenes
unique_id: ha_summary_scenes unique_id: ha_summary_v2_scenes
default_entity_id: sensor.ha_summary_v2_scenes
state: "{{ states.scene | list | length }}" state: "{{ states.scene | list | length }}"
- name: HA Summary - scripts - name: HA Summary V2 - scripts
unique_id: ha_summary_scripts unique_id: ha_summary_v2_scripts
default_entity_id: sensor.ha_summary_v2_scripts
state: "{{ states.script | list | length }}" state: "{{ states.script | list | length }}"
- name: HA Summary - automations - name: HA Summary V2 - automations
unique_id: ha_summary_automations unique_id: ha_summary_v2_automations
default_entity_id: sensor.ha_summary_v2_automations
state: "{{ states.automation | list | length }}" state: "{{ states.automation | list | length }}"
# ---------- Add-ons and updates ---------- #:####################################################################################:#
- name: HA Summary - addons # Add-ons and updates
unique_id: ha_summary_addons #:####################################################################################:#
- name: HA Summary V2 - addons
unique_id: ha_summary_v2_addons
default_entity_id: sensor.ha_summary_v2_addons
icon: mdi:puzzle icon: mdi:puzzle
state: >- state: >-
{% set hassio_entities = integration_entities('hassio') | list %} {% set hassio_entities = integration_entities('hassio') | list %}
@@ -92,8 +105,9 @@ template:
{% endfor %} {% endfor %}
{{ count.v }} {{ count.v }}
- name: HA Summary - hacs updates - name: HA Summary V2 - updates available
unique_id: ha_summary_hacs_updates unique_id: ha_summary_v2_updates_available
default_entity_id: sensor.ha_summary_v2_updates_available
icon: mdi:download icon: mdi:download
state: >- state: >-
{% set count = namespace(v=0) %} {% set count = namespace(v=0) %}
@@ -104,9 +118,13 @@ template:
{% endfor %} {% endfor %}
{{ count.v }} {{ count.v }}
# ---------- ESPHome ---------- #:####################################################################################:#
- name: HA Summary - esphome devices # ESPHome
unique_id: ha_summary_esphome_devices #:####################################################################################:#
- name: HA Summary V2 - esphome devices
unique_id: ha_summary_v2_esphome_devices
default_entity_id: sensor.ha_summary_v2_esphome_devices
unit_of_measurement: "devices" unit_of_measurement: "devices"
state: >- state: >-
{% set ids = namespace(v=[]) %} {% set ids = namespace(v=[]) %}
@@ -118,14 +136,19 @@ template:
{% endfor %} {% endfor %}
{{ ids.v | length }} {{ ids.v | length }}
- name: HA Summary - esphome entities - name: HA Summary V2 - esphome entities
unique_id: ha_summary_esphome_entities unique_id: ha_summary_v2_esphome_entities
default_entity_id: sensor.ha_summary_v2_esphome_entities
unit_of_measurement: "entities" unit_of_measurement: "entities"
state: "{{ integration_entities('esphome') | list | length }}" state: "{{ integration_entities('esphome') | list | length }}"
# ---------- Tasmota ---------- #:####################################################################################:#
- name: HA Summary - tasmota devices # Tasmota
unique_id: ha_summary_tasmota_devices #:####################################################################################:#
- name: HA Summary V2 - tasmota devices
unique_id: ha_summary_v2_tasmota_devices
default_entity_id: sensor.ha_summary_v2_tasmota_devices
unit_of_measurement: "devices" unit_of_measurement: "devices"
state: >- state: >-
{% set ids = namespace(v=[]) %} {% set ids = namespace(v=[]) %}
@@ -137,18 +160,23 @@ template:
{% endfor %} {% endfor %}
{{ ids.v | length }} {{ ids.v | length }}
- name: HA Summary - tasmota entities - name: HA Summary V2 - tasmota entities
unique_id: ha_summary_tasmota_entities unique_id: ha_summary_v2_tasmota_entities
default_entity_id: sensor.ha_summary_v2_tasmota_entities
unit_of_measurement: "entities" unit_of_measurement: "entities"
state: "{{ integration_entities('tasmota') | list | length }}" state: "{{ integration_entities('tasmota') | list | length }}"
# ---------- Zigbee via ZHA ---------- #:####################################################################################:#
- name: HA Summary - zigbee zha devices # Zigbee via ZHA
unique_id: ha_summary_zigbee_zha_devices #:####################################################################################:#
- name: HA Summary V2 - zigbee zha devices
unique_id: ha_summary_v2_zigbee_zha_devices
default_entity_id: sensor.ha_summary_v2_zigbee_zha_devices
unit_of_measurement: "devices" unit_of_measurement: "devices"
state: >- state: >-
{% set ids = namespace(v=[]) %} {% set ids = namespace(v=[]) %}
{% for e in integration_entities('zha') %} {% for e in integration_entities('zha') | list %}
{% set did = device_id(e) %} {% set did = device_id(e) %}
{% if did and did not in ids.v %} {% if did and did not in ids.v %}
{% set ids.v = ids.v + [did] %} {% set ids.v = ids.v + [did] %}
@@ -156,17 +184,19 @@ template:
{% endfor %} {% endfor %}
{{ ids.v | length }} {{ ids.v | length }}
- name: HA Summary - zigbee zha entities - name: HA Summary V2 - zigbee zha entities
unique_id: ha_summary_zigbee_zha_entities unique_id: ha_summary_v2_zigbee_zha_entities
default_entity_id: sensor.ha_summary_v2_zigbee_zha_entities
unit_of_measurement: "entities" unit_of_measurement: "entities"
state: "{{ integration_entities('zha') | list | length }}" state: "{{ integration_entities('zha') | list | length }}"
# ---------- Zigbee via Zigbee2MQTT ---------- #:####################################################################################:#
# This counts MQTT entities whose Home Assistant device identifiers # Zigbee via Zigbee2MQTT
# include "zigbee2mqtt". This should catch devices with clean entity IDs #:####################################################################################:#
# like sensor.lounge_blind_b_xbl12_battery.
- name: HA Summary - zigbee z2m devices - name: HA Summary V2 - zigbee z2m devices
unique_id: ha_summary_zigbee_z2m_devices unique_id: ha_summary_v2_zigbee_z2m_devices
default_entity_id: sensor.ha_summary_v2_zigbee_z2m_devices
unit_of_measurement: "devices" unit_of_measurement: "devices"
state: >- state: >-
{% set dids = namespace(v=[]) %} {% set dids = namespace(v=[]) %}
@@ -187,8 +217,9 @@ template:
{% endfor %} {% endfor %}
{{ dids.v | length }} {{ dids.v | length }}
- name: HA Summary - zigbee z2m entities - name: HA Summary V2 - zigbee z2m entities
unique_id: ha_summary_zigbee_z2m_entities unique_id: ha_summary_v2_zigbee_z2m_entities
default_entity_id: sensor.ha_summary_v2_zigbee_z2m_entities
unit_of_measurement: "entities" unit_of_measurement: "entities"
state: >- state: >-
{% set ent = namespace(v=[]) %} {% set ent = namespace(v=[]) %}
@@ -209,9 +240,13 @@ template:
{% endfor %} {% endfor %}
{{ ent.v | unique | list | length }} {{ ent.v | unique | list | length }}
# ---------- Matter total ---------- #:####################################################################################:#
- name: HA Summary - matter devices # Matter
unique_id: ha_summary_matter_devices #:####################################################################################:#
- name: HA Summary V2 - matter devices
unique_id: ha_summary_v2_matter_devices
default_entity_id: sensor.ha_summary_v2_matter_devices
unit_of_measurement: "devices" unit_of_measurement: "devices"
state: >- state: >-
{% set ids = namespace(v=[]) %} {% set ids = namespace(v=[]) %}
@@ -223,14 +258,15 @@ template:
{% endfor %} {% endfor %}
{{ ids.v | length }} {{ ids.v | length }}
- name: HA Summary - matter entities - name: HA Summary V2 - matter entities
unique_id: ha_summary_matter_entities unique_id: ha_summary_v2_matter_entities
default_entity_id: sensor.ha_summary_v2_matter_entities
unit_of_measurement: "entities" unit_of_measurement: "entities"
state: "{{ integration_entities('matter') | list | length }}" state: "{{ integration_entities('matter') | list | length }}"
# ---------- Matter over Wi-Fi / Ethernet - best effort ---------- - name: HA Summary V2 - matter wifi devices
- name: HA Summary - matter wifi devices unique_id: ha_summary_v2_matter_wifi_devices
unique_id: ha_summary_matter_wifi_devices default_entity_id: sensor.ha_summary_v2_matter_wifi_devices
unit_of_measurement: "devices" unit_of_measurement: "devices"
state: >- state: >-
{% set dids = namespace(v=[]) %} {% set dids = namespace(v=[]) %}
@@ -251,8 +287,9 @@ template:
{% endfor %} {% endfor %}
{{ dids.v | length }} {{ dids.v | length }}
- name: HA Summary - matter wifi entities - name: HA Summary V2 - matter wifi entities
unique_id: ha_summary_matter_wifi_entities unique_id: ha_summary_v2_matter_wifi_entities
default_entity_id: sensor.ha_summary_v2_matter_wifi_entities
unit_of_measurement: "entities" unit_of_measurement: "entities"
state: >- state: >-
{% set ent = namespace(v=[]) %} {% set ent = namespace(v=[]) %}
@@ -273,9 +310,9 @@ template:
{% endfor %} {% endfor %}
{{ ent.v | unique | list | length }} {{ ent.v | unique | list | length }}
# ---------- Matter over Thread - best effort ---------- - name: HA Summary V2 - matter thread devices
- name: HA Summary - matter thread devices unique_id: ha_summary_v2_matter_thread_devices
unique_id: ha_summary_matter_thread_devices default_entity_id: sensor.ha_summary_v2_matter_thread_devices
unit_of_measurement: "devices" unit_of_measurement: "devices"
state: >- state: >-
{% set dids = namespace(v=[]) %} {% set dids = namespace(v=[]) %}
@@ -296,8 +333,9 @@ template:
{% endfor %} {% endfor %}
{{ dids.v | length }} {{ dids.v | length }}
- name: HA Summary - matter thread entities - name: HA Summary V2 - matter thread entities
unique_id: ha_summary_matter_thread_entities unique_id: ha_summary_v2_matter_thread_entities
default_entity_id: sensor.ha_summary_v2_matter_thread_entities
unit_of_measurement: "entities" unit_of_measurement: "entities"
state: >- state: >-
{% set ent = namespace(v=[]) %} {% set ent = namespace(v=[]) %}
@@ -318,28 +356,33 @@ template:
{% endfor %} {% endfor %}
{{ ent.v | unique | list | length }} {{ ent.v | unique | list | length }}
# ---------- Matter unclassified ---------- - name: HA Summary V2 - matter unclassified devices
- name: HA Summary - matter unclassified devices unique_id: ha_summary_v2_matter_unclassified_devices
unique_id: ha_summary_matter_unclassified_devices default_entity_id: sensor.ha_summary_v2_matter_unclassified_devices
unit_of_measurement: "devices" unit_of_measurement: "devices"
state: >- state: >-
{% set total = states('sensor.ha_summary_matter_devices') | int(0) %} {% set total = states('sensor.ha_summary_v2_matter_devices') | int(0) %}
{% set wifi = states('sensor.ha_summary_matter_wifi_devices') | int(0) %} {% set wifi = states('sensor.ha_summary_v2_matter_wifi_devices') | int(0) %}
{% set thread = states('sensor.ha_summary_matter_thread_devices') | int(0) %} {% set thread = states('sensor.ha_summary_v2_matter_thread_devices') | int(0) %}
{{ [total - wifi - thread, 0] | max }} {{ [total - wifi - thread, 0] | max }}
- name: HA Summary - matter unclassified entities - name: HA Summary V2 - matter unclassified entities
unique_id: ha_summary_matter_unclassified_entities unique_id: ha_summary_v2_matter_unclassified_entities
default_entity_id: sensor.ha_summary_v2_matter_unclassified_entities
unit_of_measurement: "entities" unit_of_measurement: "entities"
state: >- state: >-
{% set total = states('sensor.ha_summary_matter_entities') | int(0) %} {% set total = states('sensor.ha_summary_v2_matter_entities') | int(0) %}
{% set wifi = states('sensor.ha_summary_matter_wifi_entities') | int(0) %} {% set wifi = states('sensor.ha_summary_v2_matter_wifi_entities') | int(0) %}
{% set thread = states('sensor.ha_summary_matter_thread_entities') | int(0) %} {% set thread = states('sensor.ha_summary_v2_matter_thread_entities') | int(0) %}
{{ [total - wifi - thread, 0] | max }} {{ [total - wifi - thread, 0] | max }}
# ---------- Cloud devices/entities ---------- #:####################################################################################:#
- name: HA Summary - cloud devices # Cloud devices/entities
unique_id: ha_summary_cloud_devices #:####################################################################################:#
- name: HA Summary V2 - cloud devices
unique_id: ha_summary_v2_cloud_devices
default_entity_id: sensor.ha_summary_v2_cloud_devices
unit_of_measurement: "devices" unit_of_measurement: "devices"
state: >- state: >-
{% set dids = namespace(v=[]) %} {% set dids = namespace(v=[]) %}
@@ -366,8 +409,9 @@ template:
{% endfor %} {% endfor %}
{{ dids.v | length }} {{ dids.v | length }}
- name: HA Summary - cloud entities - name: HA Summary V2 - cloud entities
unique_id: ha_summary_cloud_entities unique_id: ha_summary_v2_cloud_entities
default_entity_id: sensor.ha_summary_v2_cloud_entities
unit_of_measurement: "entities" unit_of_measurement: "entities"
state: >- state: >-
{% set list_all = {% set list_all =