From 67d3f05fd7d7b1f2ed789ecf0e69b06fe269313e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 07:57:31 +0000 Subject: [PATCH 01/46] chore: promote to dev --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 407050de6d..61a89ee8ac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "zigbee2mqtt", - "version": "1.41.0", + "version": "1.41.0-dev", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/package.json b/package.json index 465a8f7cc0..816053a497 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zigbee2mqtt", - "version": "1.41.0", + "version": "1.41.0-dev", "description": "Zigbee to MQTT bridge using Zigbee-herdsman", "main": "index.js", "repository": { From c078ccb13606a0893a19f25378197be70c0127f6 Mon Sep 17 00:00:00 2001 From: Magnus Ihse Bursie Date: Sat, 2 Nov 2024 19:56:57 +0100 Subject: [PATCH 02/46] fix: Home Assistant: remove the diagnostic category classification for power (#24575) Co-authored-by: Koen Kanters --- lib/extension/homeassistant.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/extension/homeassistant.ts b/lib/extension/homeassistant.ts index c83791203e..611cf3c9d3 100644 --- a/lib/extension/homeassistant.ts +++ b/lib/extension/homeassistant.ts @@ -255,9 +255,9 @@ const NUMERIC_DISCOVERY_LOOKUP: {[s: string]: KeyValue} = { pm25: {device_class: 'pm25', state_class: 'measurement'}, people: {state_class: 'measurement', icon: 'mdi:account-multiple'}, position: {icon: 'mdi:valve', state_class: 'measurement'}, - power: {device_class: 'power', entity_category: 'diagnostic', state_class: 'measurement'}, - power_phase_b: {device_class: 'power', entity_category: 'diagnostic', state_class: 'measurement'}, - power_phase_c: {device_class: 'power', entity_category: 'diagnostic', state_class: 'measurement'}, + power: {device_class: 'power', state_class: 'measurement'}, + power_phase_b: {device_class: 'power', state_class: 'measurement'}, + power_phase_c: {device_class: 'power', state_class: 'measurement'}, power_factor: {device_class: 'power_factor', enabled_by_default: false, entity_category: 'diagnostic', state_class: 'measurement'}, power_outage_count: {icon: 'mdi:counter', enabled_by_default: false}, precision: {entity_category: 'config', icon: 'mdi:decimal-comma-increase'}, From 848f250dbb7e0142c7e702dab97536b8be749f5b Mon Sep 17 00:00:00 2001 From: Der Mundschenk & Compagnie Date: Sun, 3 Nov 2024 14:54:42 +0100 Subject: [PATCH 03/46] feat: Add experimental support for Home Assistant `event` entities (#24233) * Expose new event entity for actions * Unify exposed actions for HA * Fix event tests * Only add event entities wen homeassistant/experimental_event_entities is true --------- Co-authored-by: Koen Kanters --- lib/extension/homeassistant.ts | 98 ++++++++++++++++++++++++++++++++-- lib/types/types.d.ts | 1 + lib/util/settings.schema.json | 6 +++ lib/util/settings.ts | 8 ++- test/homeassistant.test.js | 89 ++++++++++++++++++++++++++++++ test/settings.test.js | 1 + 6 files changed, 199 insertions(+), 4 deletions(-) diff --git a/lib/extension/homeassistant.ts b/lib/extension/homeassistant.ts index 611cf3c9d3..a80b42318a 100644 --- a/lib/extension/homeassistant.ts +++ b/lib/extension/homeassistant.ts @@ -29,6 +29,17 @@ interface Discovered { discovered: boolean; } +interface ActionData { + action: string; + button?: string; + scene?: string; + region?: string; +} + +const ACTION_BUTTON_PATTERN: string = '^(?