diff --git a/lib/devices.js b/lib/devices.js index cd2b904d..f0b0cd6a 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({ @@ -487,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; @@ -566,7 +580,7 @@ const generator = { } } return devstates; - }, + },*/ }; function states_with_epname(entity, states) { 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": {