Closed drathbone closed 4 months ago
Does it work with the following definition?
Yes seems to work - the picture is wrong 😂 but it still works:
Correct picture for it matches this device: ZY-M100-S_2
Changed Model to ZY-M100-S_2, and that looks to be working with the correct image:
ci looks to be failing on prettier check. Not sure why, I've run it offline, and whilst prettier detects code format issues with tuya.ts, it fixes nothing 🤷♂️ 👍
❯ prettier --check tuya.ts
Checking formatting...
[warn] tuya.ts
[warn] Code style issues found in the above file. Run Prettier with --write to fix.
❯ prettier --check tuya.ts --write
Checking formatting...
[warn] tuya.ts
[warn] Code style issues fixed in the above file.
❯ prettier --check tuya.ts
Checking formatting...
[warn] tuya.ts
[warn] Code style issues found in the above file. Run Prettier with --write to fix.
As the definition works, could you add it to https://github.com/Koenkk/zigbee-herdsman-converters/blob/a161ed3a0b64d4c8ea87edeed9fbdc334a010757/src/devices/tuya.ts#L7413 and use the tuya.whitelabel
for proper detection? (search tuya.ts
for examples)
Just to be clear, I changed the Model line in the code I'd written, and all it seemed to do was change the image - all the datapoints I'd setup stayed the same and work the same.
From looking at the ZG-204ZL definition in tuya.ts, it is exposing 2 datapoints that are not relevant to this new model: 4 (Battery) - this is a USB plugged in device, and 102 (illuminance_interval) - which is not a dp that shows up for this device in tuya dev.
I guess it's about trying to keep down the increasing size of tuya.ts, but I'm guessing that adding this new sensor into the ZG-204ZL definition would display it with 2 datapoints that are unused (and changing them would cause extra messages/failures in mqtt).
If I'm misunderstanding your ask then my apologies.
It makes sense to split in that case, thanks!
Could you also submit a picture for the docs? This can be done by:
public/images/devices
directory, Add file -> Upload filesMake sure that:
ZY-M100-S_3.png
Added support for TS0601 _TZE204_nbkshs6k Human presence sensor
https://github.com/Koenkk/zigbee2mqtt/issues/23183