Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 85ee5e96d0 | |||
| 15e9903b91 | |||
| 9342616e33 | |||
| dc827a3228 |
+1
-1
@@ -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
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,8 @@
|
||||
# https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-entrancebathrmlights.yaml
|
||||
#:########################################################################################:#
|
||||
# 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.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)
|
||||
@@ -21,16 +23,29 @@
|
||||
# - Entrance bathroom switch with 2 outputs:
|
||||
# 1) Main Lights
|
||||
# 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:
|
||||
# a) Home Assistant OFFLINE, but Network and MQTT ONLINE
|
||||
# - 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.
|
||||
# b) MQTT OFFLINE (or broker unreachable)
|
||||
# - Local button control continues to toggle relays.
|
||||
# - Fan timer logic continues locally on the ESP device.
|
||||
# - MQTT state updates (if any) will not publish.
|
||||
# c) Entire WiFi/Network OFFLINE
|
||||
# - Local button control continues to toggle relays.
|
||||
# - Fan timer logic continues locally on the ESP device.
|
||||
# - Accurate time is NOT needed (SNTP not needed).
|
||||
#:########################################################################################:#
|
||||
|
||||
@@ -42,12 +57,12 @@ substitutions:
|
||||
# Device Naming
|
||||
device_name: "esp-entrancebathrmlights"
|
||||
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.
|
||||
|
||||
# Project Naming
|
||||
project_name: "Zemismart Technologies.KS-811 Double"
|
||||
project_version: "v3.9"
|
||||
project_version: "v4.1"
|
||||
|
||||
# Passwords & Secrets
|
||||
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_2_name: "Extract Fan"
|
||||
|
||||
# Fan Timer Settings
|
||||
fan_timer_duration_minutes: "10"
|
||||
|
||||
#:########################################################################################:#
|
||||
# PACKAGES: Included Common Packages
|
||||
# https://esphome.io/components/packages.html
|
||||
@@ -146,6 +164,21 @@ status_led:
|
||||
number: GPIO2
|
||||
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
|
||||
# https://esphome.io/components/binary_sensor/
|
||||
@@ -175,12 +208,127 @@ binary_sensor:
|
||||
# https://esphome.io/components/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
|
||||
name: "Relay 1: ${switch_1_name}"
|
||||
pin: GPIO13
|
||||
id: Relay_1
|
||||
on_turn_on:
|
||||
- script.execute: fan_timer_evaluate
|
||||
on_turn_off:
|
||||
- script.execute: fan_timer_evaluate
|
||||
|
||||
- platform: gpio
|
||||
name: "Relay 2: ${switch_2_name}"
|
||||
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
|
||||
@@ -245,7 +245,7 @@ script:
|
||||
heatpump_climate_entity: climate.lounge
|
||||
|
||||
gas_heater_shutdown_delay_seconds: 60
|
||||
heatpump_setpoint_offset_c: -5
|
||||
heatpump_setpoint_offset_c: -0.5
|
||||
|
||||
heatpump_setpoint: >-
|
||||
{{
|
||||
|
||||
+145
-101
@@ -1,34 +1,36 @@
|
||||
# =====================================================================
|
||||
# Home Assistant Summary - package
|
||||
#:########################################################################################:#
|
||||
# Home Assistant Summary Package - V2 #
|
||||
#:########################################################################################:#
|
||||
#
|
||||
# Counts:
|
||||
# - Total devices/entities/broken entities
|
||||
# - Cameras, areas, scenes, scripts, automations
|
||||
# - ESPHome devices/entities
|
||||
# - 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
|
||||
# Uses V2 entity IDs to avoid stale/ghost entities from earlier versions.
|
||||
#
|
||||
# Dashboard entity prefix:
|
||||
# sensor.ha_summary_v2_...
|
||||
#
|
||||
# Important:
|
||||
# - This uses only modern template: syntax.
|
||||
# - There must be no root-level:
|
||||
# sensor:
|
||||
# - platform: template
|
||||
# in this package.
|
||||
# =====================================================================
|
||||
|
||||
template:
|
||||
- sensor:
|
||||
# ---------- Totals and basics ----------
|
||||
- name: HA Summary - devices total
|
||||
unique_id: ha_summary_devices_total
|
||||
- trigger:
|
||||
- platform: event
|
||||
event_type: homeassistant_started
|
||||
- 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"
|
||||
state: >-
|
||||
{% set ids = namespace(v=[]) %}
|
||||
@@ -40,42 +42,53 @@ template:
|
||||
{% endfor %}
|
||||
{{ ids.v | length }}
|
||||
|
||||
- name: HA Summary - entities total
|
||||
unique_id: ha_summary_entities_total
|
||||
- name: HA Summary V2 - entities total
|
||||
unique_id: ha_summary_v2_entities_total
|
||||
default_entity_id: sensor.ha_summary_v2_entities_total
|
||||
unit_of_measurement: "entities"
|
||||
state: "{{ states | list | length }}"
|
||||
|
||||
- name: HA Summary - entities broken
|
||||
unique_id: ha_summary_entities_broken
|
||||
- name: HA Summary V2 - entities broken
|
||||
unique_id: ha_summary_v2_entities_broken
|
||||
default_entity_id: sensor.ha_summary_v2_entities_broken
|
||||
unit_of_measurement: "entities"
|
||||
state: >-
|
||||
{{ states | selectattr('state','in',['unavailable','unknown']) | list | length }}
|
||||
|
||||
- name: HA Summary - cameras
|
||||
unique_id: ha_summary_cameras
|
||||
- name: HA Summary V2 - cameras
|
||||
unique_id: ha_summary_v2_cameras
|
||||
default_entity_id: sensor.ha_summary_v2_cameras
|
||||
unit_of_measurement: "cameras"
|
||||
state: "{{ states.camera | list | length }}"
|
||||
|
||||
- name: HA Summary - areas
|
||||
unique_id: ha_summary_areas
|
||||
- name: HA Summary V2 - areas
|
||||
unique_id: ha_summary_v2_areas
|
||||
default_entity_id: sensor.ha_summary_v2_areas
|
||||
unit_of_measurement: "areas"
|
||||
state: "{{ areas() | list | length }}"
|
||||
|
||||
- name: HA Summary - scenes
|
||||
unique_id: ha_summary_scenes
|
||||
- name: HA Summary V2 - scenes
|
||||
unique_id: ha_summary_v2_scenes
|
||||
default_entity_id: sensor.ha_summary_v2_scenes
|
||||
state: "{{ states.scene | list | length }}"
|
||||
|
||||
- name: HA Summary - scripts
|
||||
unique_id: ha_summary_scripts
|
||||
- name: HA Summary V2 - scripts
|
||||
unique_id: ha_summary_v2_scripts
|
||||
default_entity_id: sensor.ha_summary_v2_scripts
|
||||
state: "{{ states.script | list | length }}"
|
||||
|
||||
- name: HA Summary - automations
|
||||
unique_id: ha_summary_automations
|
||||
- name: HA Summary V2 - automations
|
||||
unique_id: ha_summary_v2_automations
|
||||
default_entity_id: sensor.ha_summary_v2_automations
|
||||
state: "{{ states.automation | list | length }}"
|
||||
|
||||
# ---------- Add-ons and updates ----------
|
||||
- name: HA Summary - addons
|
||||
unique_id: ha_summary_addons
|
||||
#:####################################################################################:#
|
||||
# Add-ons and updates
|
||||
#:####################################################################################:#
|
||||
|
||||
- name: HA Summary V2 - addons
|
||||
unique_id: ha_summary_v2_addons
|
||||
default_entity_id: sensor.ha_summary_v2_addons
|
||||
icon: mdi:puzzle
|
||||
state: >-
|
||||
{% set hassio_entities = integration_entities('hassio') | list %}
|
||||
@@ -92,8 +105,9 @@ template:
|
||||
{% endfor %}
|
||||
{{ count.v }}
|
||||
|
||||
- name: HA Summary - hacs updates
|
||||
unique_id: ha_summary_hacs_updates
|
||||
- name: HA Summary V2 - updates available
|
||||
unique_id: ha_summary_v2_updates_available
|
||||
default_entity_id: sensor.ha_summary_v2_updates_available
|
||||
icon: mdi:download
|
||||
state: >-
|
||||
{% set count = namespace(v=0) %}
|
||||
@@ -104,9 +118,13 @@ template:
|
||||
{% endfor %}
|
||||
{{ count.v }}
|
||||
|
||||
# ---------- ESPHome ----------
|
||||
- name: HA Summary - esphome devices
|
||||
unique_id: ha_summary_esphome_devices
|
||||
#:####################################################################################:#
|
||||
# ESPHome
|
||||
#:####################################################################################:#
|
||||
|
||||
- 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"
|
||||
state: >-
|
||||
{% set ids = namespace(v=[]) %}
|
||||
@@ -118,14 +136,19 @@ template:
|
||||
{% endfor %}
|
||||
{{ ids.v | length }}
|
||||
|
||||
- name: HA Summary - esphome entities
|
||||
unique_id: ha_summary_esphome_entities
|
||||
- name: HA Summary V2 - esphome entities
|
||||
unique_id: ha_summary_v2_esphome_entities
|
||||
default_entity_id: sensor.ha_summary_v2_esphome_entities
|
||||
unit_of_measurement: "entities"
|
||||
state: "{{ integration_entities('esphome') | list | length }}"
|
||||
|
||||
# ---------- Tasmota ----------
|
||||
- name: HA Summary - tasmota devices
|
||||
unique_id: ha_summary_tasmota_devices
|
||||
#:####################################################################################:#
|
||||
# Tasmota
|
||||
#:####################################################################################:#
|
||||
|
||||
- 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"
|
||||
state: >-
|
||||
{% set ids = namespace(v=[]) %}
|
||||
@@ -137,18 +160,23 @@ template:
|
||||
{% endfor %}
|
||||
{{ ids.v | length }}
|
||||
|
||||
- name: HA Summary - tasmota entities
|
||||
unique_id: ha_summary_tasmota_entities
|
||||
- name: HA Summary V2 - tasmota entities
|
||||
unique_id: ha_summary_v2_tasmota_entities
|
||||
default_entity_id: sensor.ha_summary_v2_tasmota_entities
|
||||
unit_of_measurement: "entities"
|
||||
state: "{{ integration_entities('tasmota') | list | length }}"
|
||||
|
||||
# ---------- Zigbee via ZHA ----------
|
||||
- name: HA Summary - zigbee zha devices
|
||||
unique_id: ha_summary_zigbee_zha_devices
|
||||
#:####################################################################################:#
|
||||
# Zigbee via ZHA
|
||||
#:####################################################################################:#
|
||||
|
||||
- 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"
|
||||
state: >-
|
||||
{% set ids = namespace(v=[]) %}
|
||||
{% for e in integration_entities('zha') %}
|
||||
{% for e in integration_entities('zha') | list %}
|
||||
{% set did = device_id(e) %}
|
||||
{% if did and did not in ids.v %}
|
||||
{% set ids.v = ids.v + [did] %}
|
||||
@@ -156,17 +184,19 @@ template:
|
||||
{% endfor %}
|
||||
{{ ids.v | length }}
|
||||
|
||||
- name: HA Summary - zigbee zha entities
|
||||
unique_id: ha_summary_zigbee_zha_entities
|
||||
- name: HA Summary V2 - 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"
|
||||
state: "{{ integration_entities('zha') | list | length }}"
|
||||
|
||||
# ---------- Zigbee via Zigbee2MQTT ----------
|
||||
# This counts MQTT entities whose Home Assistant device identifiers
|
||||
# include "zigbee2mqtt". This should catch devices with clean entity IDs
|
||||
# like sensor.lounge_blind_b_xbl12_battery.
|
||||
- name: HA Summary - zigbee z2m devices
|
||||
unique_id: ha_summary_zigbee_z2m_devices
|
||||
#:####################################################################################:#
|
||||
# Zigbee via Zigbee2MQTT
|
||||
#:####################################################################################:#
|
||||
|
||||
- name: HA Summary V2 - 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"
|
||||
state: >-
|
||||
{% set dids = namespace(v=[]) %}
|
||||
@@ -187,8 +217,9 @@ template:
|
||||
{% endfor %}
|
||||
{{ dids.v | length }}
|
||||
|
||||
- name: HA Summary - zigbee z2m entities
|
||||
unique_id: ha_summary_zigbee_z2m_entities
|
||||
- name: HA Summary V2 - 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"
|
||||
state: >-
|
||||
{% set ent = namespace(v=[]) %}
|
||||
@@ -209,9 +240,13 @@ template:
|
||||
{% endfor %}
|
||||
{{ ent.v | unique | list | length }}
|
||||
|
||||
# ---------- Matter total ----------
|
||||
- name: HA Summary - matter devices
|
||||
unique_id: ha_summary_matter_devices
|
||||
#:####################################################################################:#
|
||||
# Matter
|
||||
#:####################################################################################:#
|
||||
|
||||
- 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"
|
||||
state: >-
|
||||
{% set ids = namespace(v=[]) %}
|
||||
@@ -223,14 +258,15 @@ template:
|
||||
{% endfor %}
|
||||
{{ ids.v | length }}
|
||||
|
||||
- name: HA Summary - matter entities
|
||||
unique_id: ha_summary_matter_entities
|
||||
- name: HA Summary V2 - matter entities
|
||||
unique_id: ha_summary_v2_matter_entities
|
||||
default_entity_id: sensor.ha_summary_v2_matter_entities
|
||||
unit_of_measurement: "entities"
|
||||
state: "{{ integration_entities('matter') | list | length }}"
|
||||
|
||||
# ---------- Matter over Wi-Fi / Ethernet - best effort ----------
|
||||
- name: HA Summary - matter wifi devices
|
||||
unique_id: ha_summary_matter_wifi_devices
|
||||
- name: HA Summary V2 - matter wifi devices
|
||||
unique_id: ha_summary_v2_matter_wifi_devices
|
||||
default_entity_id: sensor.ha_summary_v2_matter_wifi_devices
|
||||
unit_of_measurement: "devices"
|
||||
state: >-
|
||||
{% set dids = namespace(v=[]) %}
|
||||
@@ -251,8 +287,9 @@ template:
|
||||
{% endfor %}
|
||||
{{ dids.v | length }}
|
||||
|
||||
- name: HA Summary - matter wifi entities
|
||||
unique_id: ha_summary_matter_wifi_entities
|
||||
- name: HA Summary V2 - 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"
|
||||
state: >-
|
||||
{% set ent = namespace(v=[]) %}
|
||||
@@ -273,9 +310,9 @@ template:
|
||||
{% endfor %}
|
||||
{{ ent.v | unique | list | length }}
|
||||
|
||||
# ---------- Matter over Thread - best effort ----------
|
||||
- name: HA Summary - matter thread devices
|
||||
unique_id: ha_summary_matter_thread_devices
|
||||
- name: HA Summary V2 - matter thread devices
|
||||
unique_id: ha_summary_v2_matter_thread_devices
|
||||
default_entity_id: sensor.ha_summary_v2_matter_thread_devices
|
||||
unit_of_measurement: "devices"
|
||||
state: >-
|
||||
{% set dids = namespace(v=[]) %}
|
||||
@@ -296,8 +333,9 @@ template:
|
||||
{% endfor %}
|
||||
{{ dids.v | length }}
|
||||
|
||||
- name: HA Summary - matter thread entities
|
||||
unique_id: ha_summary_matter_thread_entities
|
||||
- name: HA Summary V2 - 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"
|
||||
state: >-
|
||||
{% set ent = namespace(v=[]) %}
|
||||
@@ -318,28 +356,33 @@ template:
|
||||
{% endfor %}
|
||||
{{ ent.v | unique | list | length }}
|
||||
|
||||
# ---------- Matter unclassified ----------
|
||||
- name: HA Summary - matter unclassified devices
|
||||
unique_id: ha_summary_matter_unclassified_devices
|
||||
- name: HA Summary V2 - matter unclassified devices
|
||||
unique_id: ha_summary_v2_matter_unclassified_devices
|
||||
default_entity_id: sensor.ha_summary_v2_matter_unclassified_devices
|
||||
unit_of_measurement: "devices"
|
||||
state: >-
|
||||
{% set total = states('sensor.ha_summary_matter_devices') | int(0) %}
|
||||
{% set wifi = states('sensor.ha_summary_matter_wifi_devices') | int(0) %}
|
||||
{% set thread = states('sensor.ha_summary_matter_thread_devices') | int(0) %}
|
||||
{% set total = states('sensor.ha_summary_v2_matter_devices') | int(0) %}
|
||||
{% set wifi = states('sensor.ha_summary_v2_matter_wifi_devices') | int(0) %}
|
||||
{% set thread = states('sensor.ha_summary_v2_matter_thread_devices') | int(0) %}
|
||||
{{ [total - wifi - thread, 0] | max }}
|
||||
|
||||
- name: HA Summary - matter unclassified entities
|
||||
unique_id: ha_summary_matter_unclassified_entities
|
||||
- name: HA Summary V2 - 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"
|
||||
state: >-
|
||||
{% set total = states('sensor.ha_summary_matter_entities') | int(0) %}
|
||||
{% set wifi = states('sensor.ha_summary_matter_wifi_entities') | int(0) %}
|
||||
{% set thread = states('sensor.ha_summary_matter_thread_entities') | int(0) %}
|
||||
{% set total = states('sensor.ha_summary_v2_matter_entities') | int(0) %}
|
||||
{% set wifi = states('sensor.ha_summary_v2_matter_wifi_entities') | int(0) %}
|
||||
{% set thread = states('sensor.ha_summary_v2_matter_thread_entities') | int(0) %}
|
||||
{{ [total - wifi - thread, 0] | max }}
|
||||
|
||||
# ---------- Cloud devices/entities ----------
|
||||
- name: HA Summary - cloud devices
|
||||
unique_id: ha_summary_cloud_devices
|
||||
#:####################################################################################:#
|
||||
# Cloud devices/entities
|
||||
#:####################################################################################:#
|
||||
|
||||
- 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"
|
||||
state: >-
|
||||
{% set dids = namespace(v=[]) %}
|
||||
@@ -366,8 +409,9 @@ template:
|
||||
{% endfor %}
|
||||
{{ dids.v | length }}
|
||||
|
||||
- name: HA Summary - cloud entities
|
||||
unique_id: ha_summary_cloud_entities
|
||||
- name: HA Summary V2 - cloud entities
|
||||
unique_id: ha_summary_v2_cloud_entities
|
||||
default_entity_id: sensor.ha_summary_v2_cloud_entities
|
||||
unit_of_measurement: "entities"
|
||||
state: >-
|
||||
{% set list_all =
|
||||
|
||||
Reference in New Issue
Block a user