-
Notifications
You must be signed in to change notification settings - Fork 488
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
Add initial support for Tuya siren #4379
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a few comments. Can you please have a look, I think this PR needs to wait for a 2.10.1 release in roughly a week.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another round of comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting closer :)
tuya.cpp
Outdated
} | ||
quint8 valve = static_cast<quint8>(dp & 0xFF); | ||
quint8 temperature = static_cast<quint8>((dp >> 8) & 0xFF); | ||
quint8 minute = static_cast<quint8>((dp >> 16) & 0xFF); // TODO, U16 >> 16 ... this is always 0?! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case I wouldn't add it to the PR or at least comment it out with a note what it is and why it isn't used.
In general I'm very against adding dead code since usually it stays there for years with nobody having a clue why it's there and everybody afraid of removing it ;)
Manufacture name : _TYST11_d0yu2xgi issue #3183
It s a USB or battery siren https://zigbee.blakadder.com/Neo_NAS-AB02B0.html
This device create 3 sensors, ZHAAlarm + ZHAhumidity + ZHAtemperature.
All settings are on the ZHAAlarm (melody, volume, trigger, ect ...)
The threshold need to be set with Array [min, max], need to improve it.