-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[New device support]: _TZE200_lawxy9e2 #21787
Comments
Added, thanks! Changes will be available in the dev branch in a few hours from now. |
@Koenkk this one might be a bit different as it includes a light switch as well, just bought one of these, added the external definition according to your commit and there's only an on/off for the fan, but not the light. Update: My bad, there is a light switch in the definition but it seems to turn the fan on and off at least. |
The following worked for me in the end: const tuya = require('zigbee-herdsman-converters/lib/tuya');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const e = exposes.presets;
const ea = exposes.access;
module.exports = {
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_lawxy9e2']),
model: 'TS0601_fan_switch',
vendor: 'TuYa',
description: 'Fan switch',
fromZigbee: [tuya.fz.datapoints],
toZigbee: [tuya.tz.datapoints],
configure: tuya.configureMagicPacket,
exposes: [
e.binary('status_indication', ea.STATE_SET, 'ON', 'OFF').withDescription('Light switch'),
tuya.exposes.switch(), e.power_on_behavior(['off', 'on']).withAccess(ea.STATE_SET).withDescription('Fan switch'),
tuya.exposes.countdown().withValueMin(0).withValueMax(43200).withUnit('s').withDescription('Max ON time in seconds'),
e.numeric('fan_speed', ea.STATE_SET).withValueMin(1).withValueMax(5).withValueStep(1)
.withDescription('Speed off the fan'),
],
meta: {
tuyaDatapoints: [
[1, 'state', tuya.valueConverter.onOff],
[2, 'countdown', tuya.valueConverter.countdown],
[3, 'fan_speed', tuya.valueConverterBasic
.lookup({'1': tuya.enum(0), '2': tuya.enum(1), '3': tuya.enum(2), '4': tuya.enum(3), '5': tuya.enum(4)})],
[11, 'power_on_behavior', tuya.valueConverterBasic.lookup({'off': tuya.enum(0), 'on': tuya.enum(1)})],
[5, 'status_indication', tuya.valueConverter.onOff],
],
},
whiteLabel: [
{vendor: 'Lerlink', model: 'T2-Z67/T2-W67'},
],
}; |
Could you make a pull request? |
I'm currently trying to make both the light switch and fan switch show up in home assistant and having issues, if I manage to fix that I'll make a PR, but in its current state it isn't very helpful in my opinion. When setting the max speed (5), an exception is thrown as well so I'm a bit confused about that and investigating. |
Hello! same problem here. Z2m only shows the fan switch, but the light does not appear. However, he switch has both functions. Tried pairing with SmartLife and working normally. Any solution for this problem? |
Yes, thank you! Now it works. Only an error occurs when we set the fan to speed 5. Zigbee2MQTT:error 2024-04-25 16:29:39: Exception while calling fromZigbee converter: Value '5' is not allowed, expected one of [object Object],[object Object],[object Object],[object Object],[object Object]} anyone can helpe please? |
That's what I've been trying to fix, along with making the light switch show up on Home Assistant, however I've been unable to. |
You still can't control the light through the home assistant? Strange, here I can control both the light and the fan normally with the code you shared. The only strange thing is that message when setting it to speed 5. |
Ok, I think I managed to figure out what the error is, it seems that the fan speed 5 is mapped to I'm not sure how to solve this because we map 5 to @Koenkk Could you assist on this matter? |
Also, in addition to the error above, it reports wrong fan speed value (value+1) when I tap on fan power on/off button (according to LED indicator). |
It doesn't work with |
No, it produces the error @rmribeiro2024 mentioned above:
|
And with |
Exception seems to be gone on my side, thank you, @Koenkk. Still misreading on LED and MQTT report, but I am unsure if this is a hardware error. |
Integrated the fix! Changes will be available in the dev branch in a few hours from now. |
Link
https://es.aliexpress.com/item/1005005835095616.html?spm=a2g0o.productlist.main.1.44527fCg7fCgi5&algo_pvid=7fb3c305-7bff-4840-a2e4-372bb6f11641&algo_exp_id=7fb3c305-7bff-4840-a2e4-372bb6f11641-0&pdp_npi=4%40dis%21BRL%2188.15%2188.15%21%21%21121.17%21121.17%21%402103242517103533450598063e4746%2112000034518044886%21sea%21BR%213365536725%21&curPageLogUid=uNDEPdupkWB7&utparam-url=scene%3Asearch%7Cquery_from%3A
Database entry
{"id":16,"type":"Router","ieeeAddr":"0xa4c138ed34c8ed28","nwkAddr":3533,"manufId":4417,"manufName":"_TZE200_lawxy9e2","powerSource":"Mains (single phase)","modelId":"TS0601","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":81,"inClusterList":[4,5,61184,0],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"65503":"P�}-iϳ}-iϳ}-iг}-iг}-iѳ}-iҳ}-i","65506":54,"65508":0,"stackVersion":0,"dateCode":"","appVersion":70}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":70,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1710349544758}
Comments
I'm not a programmer, but did some copying and pasting. It just works for me. Don't know if it can be done in a better way
External definition
The text was updated successfully, but these errors were encountered: