-
Notifications
You must be signed in to change notification settings - Fork 523
Tuya thermostat and switch improvements, Kwikset 914 smart lock #3457
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
Conversation
The PR is a bit too large. For the upcoming stable version I'd like to merge only the fixes but not new supported devices. |
@manup I'd like to remind you: We agreed on having no changes in stable releases. Stable has to be 100% of latest beta + any small fixes that occurred since then(Xiaomi vib sensor for example). |
I m agree, PR are too "meshed" (can't make small fixes with it) and code is too "sensible", can wait for beta, I will correct conflict later. |
Update code with last official version
I've changed the PR title and description to be more specific about for which devices the changes are. |
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, note some do apply to multiple code locations which I didn't comment.
tuya.cpp
Outdated
else if (data == 1) { mode = QLatin1String("auto"); } // back to "auto" | ||
else | ||
{ | ||
DBG_Assert(data <= 0); // unsupported |
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.
DBG_Assert(data <= 1); // unsupported
tuya.cpp
Outdated
else if (data == 6) { preset = QLatin1String("complex"); } | ||
else | ||
{ | ||
DBG_Assert(data <= 0); // unsupported |
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.
DBG_Assert(data <= 6); // unsupported
tuya.cpp
Outdated
else if (dp == 0x0403) { preset = QLatin1String("program"); } | ||
else | ||
{ | ||
DBG_Assert(data <= 0); // unsupported |
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.
DBG_Assert(data == 0x0402 || data == 0x0403); // unsupported
tuya.cpp
Outdated
else if (data == 1) { mode = QLatin1String("manu"); } | ||
else | ||
{ | ||
DBG_Assert(data <= 0); // unsupported |
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.
DBG_Assert(data <= 1); // unsupported
tuya.cpp
Outdated
else if (data == 1) { mode = QLatin1String("heat"); } | ||
else | ||
{ | ||
DBG_Assert(data <= 0); // unsupported |
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.
DBG_Assert(data <= 1); // unsupported
tuya.cpp
Outdated
if (part > 0 && listday.size() >= static_cast<int>(part)) | ||
{ | ||
updateThermostatSchedule(sensorNode, listday.at(part - 1), transitions); | ||
} |
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.
The check is good now, but updateThermostatSchedule()
will never be called because due the prior for loop part will always be decremented down to 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.
I have to admit I don't understand the logic here. Is this supposed to be within the loop?
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.
Yep, there is something not finished here #3457 (comment)
Not enought time to test it, and as I don't want to broke something, I had let the old tested version.
Have corrected the code, schedule is not the more important ATM.
lift
Zenismart ZigBee Smart Curtain Switch ZW-EC-01 #3438Not tuya stuff