From ed25091be6c0669c9d4291ab9b8e5571039e7122 Mon Sep 17 00:00:00 2001 From: Agav Date: Mon, 4 Nov 2024 21:07:47 +0300 Subject: [PATCH 1/3] ptvo: Add hold Action --- lib/devices.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/devices.js b/lib/devices.js index 0fc50b8d..30b7d21f 100644 --- a/lib/devices.js +++ b/lib/devices.js @@ -306,7 +306,9 @@ const generator = { setattr: 'state', }); } - if (endpoint.supportsOutputCluster('genMultistateInput')) { + if (endpoint.supportsOutputCluster('genMultistateInput')|| + endpoint.clusters.hasOwnProperty('genMultistateInput') + ) { devstates.push({ id: `channel_${epID}.click`, prop: 'action', @@ -343,6 +345,18 @@ const generator = { isEvent: true, getter: payload => payload.action === `tripple_${epName}` ? true : undefined, }); + devstates.push({ + id: `channel_${epID}.hold`, + prop: 'action', + name: `long click event`, + icon: undefined, + role: 'button', + write: false, + read: true, + type: 'boolean', + isEvent: true, + getter: payload => payload.action === `hold_${epName}` ? true : undefined, + }); } if (endpoint.supportsOutputCluster('genLevelCtrl')) { devstates.push({ From 346cc93daa7c0d8fec0ef9b6ed810ed8b5b44008 Mon Sep 17 00:00:00 2001 From: arteck <6681528+arteck@users.noreply.github.com> Date: Fri, 15 Nov 2024 06:48:07 +0100 Subject: [PATCH 2/3] "zigbee-herdsman": "2.1.8", "zigbee-herdsman-converters": "20.47.0" --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a8c89386..93631720 100644 --- a/package.json +++ b/package.json @@ -28,8 +28,8 @@ "ajv": "^8.17.1", "uri-js": "^4.4.1", "typescript": "^5.6.3", - "zigbee-herdsman": "2.1.4", - "zigbee-herdsman-converters": "20.28.0" + "zigbee-herdsman": "2.1.8", + "zigbee-herdsman-converters": "20.47.0" }, "description": "Zigbee devices", "devDependencies": { From 96458a5c02feaca4f80143886c97ba87e277ee57 Mon Sep 17 00:00:00 2001 From: Agav Date: Fri, 15 Nov 2024 19:58:44 +0300 Subject: [PATCH 3/3] commented the unused PTVO code --- lib/devices.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/devices.js b/lib/devices.js index 30b7d21f..1c7d4cf5 100644 --- a/lib/devices.js +++ b/lib/devices.js @@ -501,7 +501,7 @@ const generator = { }); return icasa_states; }, - ptvo_switch: (entity) => { + /*ptvo_switch: (entity) => { const devstates = []; for (const endpoint of entity.device.endpoints) { const epID = endpoint.ID; @@ -580,7 +580,7 @@ const generator = { } } return devstates; - }, + },*/ }; function states_with_epname(entity, states) {