-
Notifications
You must be signed in to change notification settings - Fork 127
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
Fix support for BLE TRV #28
Conversation
Hi, thank you for contribution, You have made a lot of formatting changes, it's hard to separate formatting changes and all others. Which formatter with which settings have you used?
|
I am using the dev container from the HA Development guide. It seems to auto format on save using the default Python extension. As for the errors, I could not find anything useful other than a log message about the device unexpectedly disconnecting. What I found more weird is the state where the device state updates following changes in HA UI but the UI reverts to the old state, making it out of sync with the device. I believe something is wrong in handle_coordinator_update or somewhere similar. |
Are you okay with me submitting a PR that formats the whole repo based on VS Code default settings? After that, this PR can be debased and the changes would be minimal. |
Yes, it would be great. |
It seems like I can get a lot more logs by enabling "Enable device logging" option in HA for this integration. I'll look more to see if I can find something. I also have the CubeTouch S1 which seems to stay reliably connected no matter how long the integration is running. |
This did not help. I had to add a line in |
Logs below. It seems like after the device disconnects, the integration continues to successfully send commands to it, but it stops reading any updates. The HA state of the UI seems stuck, but the device is actually executing the updates (like e.g. setting the temperature or the preset mode)
|
@PlusPlus-ua @forabi Thanks for your work on handling TRV. I was able to add the correct entity name support, also I added support for my thermostat head which has id: "nhj2j7su". I did the fixes on your branch @forabi, for now I have it all locally but I will do a pull if your current changes are uploaded from "pull request" on the main branch. Also, I am having problems updating status and temperature. I have 2 of these thermostatic heads and alternately I always have problems with one. |
@Yokosa You could start a branch that targets my PR as a base and then it can be merged after mine. Unfortunately I haven't found the reason for the intermittent disconnect yet. My observation is that the device continues to respond to changes from HA, but HA stops reading the new changes from the device. This continues for hours and the only fix is to either reload the integration or restart HA entirely. |
I think this can be reviewed and merged despite the remaining issues, which I can try to fix in a follow-up PR. @Yokosa feel free to open a new PR with your changes too! Thanks! |
@forabi Something is wrong after the merge of recent changes. The buttons are not detected and the set temperature is wrongly displayed. |
@Yokosa Try removing and re-adding the device |
It is still not working properly. In climate.py is missing target_temperature_coefficient=10.0, switchs is just analyzing. |
@PlusPlus-ua Continuing with the debugging, it looks like
This is why the UI states never update, even though the device continues to receive update commands and executing them succesfully. Any hints why this method may not be called? Any way to force a reconnect or something? |
Related to #18
This fixes a couple issues with the experimental TRV support, although things are still not perfect.
It adds:
Still not working properly/missing (need help with those)
switch_trv_xxx_1
instead of e.g.switch_trv_xxx_child_lock
)