You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried creating a new device and followed the instructions. The issue I'm having is that the device itself supports connection to physical toggle or momentary switches, but for some reason I could not get these attributes exposed or operating in z2Mqtt. Currently the device is operating like a 'momentary switch' is connected, instead of toggle switch.
Link
https://www.ikuu.com.au/product/inline-switch-compatible-with-momentary-press-2/
Database entry
{"id":37,"type":"Router","ieeeAddr":"0x70ac08fffe18cf84","nwkAddr":48867,"manufId":4098,"manufName":"_TZ3000_hf3jhnf0","powerSource":"Mains (single phase)","modelId":"TS0001","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":256,"inClusterList":[0,3,4,5,6,57344,57345],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65534":0,"modelId":"TS0001","manufacturerName":"_TZ3000_hf3jhnf0","powerSource":1,"zclVersion":3,"appVersion":76,"stackVersion":0,"hwVersion":1,"dateCode":""}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0xe0798dfffe110ee9","endpointID":1}],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":76,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{"configured":332242049},"lastSeen":1729674000357}
Zigbee2MQTT version
1.40.2
Comments
I tried creating a new device and followed the instructions. The issue I'm having is that the device itself supports connection to physical toggle or momentary switches, but for some reason I could not get these attributes exposed or operating in z2Mqtt. Currently the device is operating like a 'momentary switch' is connected, instead of toggle switch.
External definition
What does/doesn't work with the external definition?
I do not get the option for switch_type (momentary/toggle/etc). I've also tried something like the below, but does not appear to work.
const {onOff} = require('zigbee-herdsman-converters/lib/modernExtend');
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const utils = require('zigbee-herdsman-converters/lib/utils');
const globalStore = require('zigbee-herdsman-converters/lib/store');
const e = exposes.presets;
const ea = exposes.access;
const definition = {
zigbeeModel: [‘WHD02’],
model: 'TS0101',
vendor: '_TZ3000_hf3jhnf0',
description: 'CUSTOM FILE',
extend: [onOff({"powerOnBehavior":false})],
meta: {
multiendpoint: true,
tuyaDatapoint: [
[107, 'switch_type', tuya.valueConverter.switchType],
],
},
tozigbee: [tz.on_off, tuya.tz.power_on_behavior, tuya.tz.switch_type],
fromzigbee: [fz.on_off, tuya.fz.power_on_behavior, tuya.fz.switch_type],
exposes: [tuya.exposes.switchType()],
};
module.exports = definition;
The text was updated successfully, but these errors were encountered: