-
-
Notifications
You must be signed in to change notification settings - Fork 568
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
gateway: remove click support for gateway devices #1229
Conversation
@rytilahti could you have a look at this since the current HomeAssistant release the alarm and gateway light entities are broken |
Codecov Report
@@ Coverage Diff @@
## master #1229 +/- ##
==========================================
+ Coverage 76.10% 79.20% +3.10%
==========================================
Files 76 90 +14
Lines 8926 9696 +770
Branches 750 1130 +380
==========================================
+ Hits 6793 7680 +887
+ Misses 1950 1824 -126
- Partials 183 192 +9
Continue to review full report at Codecov.
|
@rytilahti same problem here. |
The real fix is not removing the click support but to avoid doing model detection on those subdevices which do not have a host themselves, I overlooked this issue when I added the model detection, sorry... I created a PR, but someone with a test device should give it a try before I merge it :-) |
@rytilahti |
@scxs535 you have to clone this PR and use that checkout in your setup. If you are not sure how to do that in your system, it's easier to wait for now. @starkillerOG could you please create a very simple test script to see what happens if you call edit: oh, there's another option that's possible: pass the host, token et. al. to the gateway device constructors, so that they can acquire the info as usual. The downside is that those queries will not be routed through the main instance and will cause I/O, if I'm not mistaken? |
Tested again and it works. |
I don't really want to do any calls from the subdevice itself, but only invoke calls to the parent object (gateway). Also because the message id will not be properly incremented which could potentially cause issues. (otherwise there would be 2 messages ids that are incrementing at diffrent times and that could get messy). |
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.
LGTM, thanks for stepping up so quickly to fix this @starkillerOG! 👍
This release fixes regressions caused by the recent refactoring related to supported models: * philips_bulb now defaults to a bulb that has color temperature setting * gateway devices do not perform an info query as that is handled by their parent Also, the list of the supported models was extended thanks to the feedback from the community! [Full Changelog](0.5.9.1...0.5.9.2) **Implemented enhancements:** - Add yeelink.bhf\_light.v2 and yeelink.light.lamp22 support [\#1250](#1250) ([FaintGhost](https://github.com/FaintGhost)) - Skip warning if the unknown model is reported on a base class [\#1243](#1243) ([rytilahti](https://github.com/rytilahti)) - Add emptying bin status for roborock s7+ [\#1190](#1190) ([rytilahti](https://github.com/rytilahti)) **Fixed bugs:** - Fix Roborock S7 fan speed [\#1235](#1235) ([shred86](https://github.com/shred86)) - gateway: remove click support for gateway devices [\#1229](#1229) ([starkillerOG](https://github.com/starkillerOG)) - mirobo: make sure config always exists [\#1207](#1207) ([rytilahti](https://github.com/rytilahti)) - Fix typo [\#1204](#1204) ([com30n](https://github.com/com30n)) **Merged pull requests:** - philips\_eyecare: add philips.light.sread1 as supported [\#1246](#1246) ([rytilahti](https://github.com/rytilahti)) - Add yeelink.light.color3 support [\#1245](#1245) ([Kirmas](https://github.com/Kirmas)) - Use codecov-action@v2 for CI [\#1244](#1244) ([rytilahti](https://github.com/rytilahti)) - Add yeelink.light.color5 support [\#1242](#1242) ([Kirmas](https://github.com/Kirmas)) - Add more supported devices to their corresponding classes [\#1237](#1237) ([rytilahti](https://github.com/rytilahti)) - Add zhimi.humidfier.ca4 as supported model [\#1220](#1220) ([jbouwh](https://github.com/jbouwh)) - vacuum: Add t7s \(roborock.vacuum.a14\) [\#1214](#1214) ([rytilahti](https://github.com/rytilahti)) - philips\_bulb: add philips.light.downlight to supported devices [\#1212](#1212) ([rytilahti](https://github.com/rytilahti))
This release fixes regressions caused by the recent refactoring related to supported models: * philips_bulb now defaults to a bulb that has color temperature setting * gateway devices do not perform an info query as that is handled by their parent Also, the list of the supported models was extended thanks to the feedback from the community! [Full Changelog](0.5.9.1...0.5.9.2) **Implemented enhancements:** - Add yeelink.bhf\_light.v2 and yeelink.light.lamp22 support [\#1250](#1250) ([FaintGhost](https://github.com/FaintGhost)) - Skip warning if the unknown model is reported on a base class [\#1243](#1243) ([rytilahti](https://github.com/rytilahti)) - Add emptying bin status for roborock s7+ [\#1190](#1190) ([rytilahti](https://github.com/rytilahti)) **Fixed bugs:** - Fix Roborock S7 fan speed [\#1235](#1235) ([shred86](https://github.com/shred86)) - gateway: remove click support for gateway devices [\#1229](#1229) ([starkillerOG](https://github.com/starkillerOG)) - mirobo: make sure config always exists [\#1207](#1207) ([rytilahti](https://github.com/rytilahti)) - Fix typo [\#1204](#1204) ([com30n](https://github.com/com30n)) **Merged pull requests:** - philips\_eyecare: add philips.light.sread1 as supported [\#1246](#1246) ([rytilahti](https://github.com/rytilahti)) - Add yeelink.light.color3 support [\#1245](#1245) ([Kirmas](https://github.com/Kirmas)) - Use codecov-action@v2 for CI [\#1244](#1244) ([rytilahti](https://github.com/rytilahti)) - Add yeelink.light.color5 support [\#1242](#1242) ([Kirmas](https://github.com/Kirmas)) - Add more supported devices to their corresponding classes [\#1237](#1237) ([rytilahti](https://github.com/rytilahti)) - Add zhimi.humidfier.ca4 as supported model [\#1220](#1220) ([jbouwh](https://github.com/jbouwh)) - vacuum: Add t7s \(roborock.vacuum.a14\) [\#1214](#1214) ([rytilahti](https://github.com/rytilahti)) - philips\_bulb: add philips.light.downlight to supported devices [\#1212](#1212) ([rytilahti](https://github.com/rytilahti))
With 0.5.9.2 release, with a lumi.gateway.v3-MW300, Alarm and Luminance entities are present, but still no Light. |
@manu3b1 please open a new issue on that and provide some logs so that we have something that can be used to figure out why it isn't working. @starkillerOG do you have a v3? Are you also experiencing the missing light? |
Light is back with HA 2021.12.2. |
everything(alarm & light) works well as before after update to 2021.12.2. 👍 |
Glad to hear it's working and sorry for the inconvenience! It's rather hard to perform refactoring already on a code base size of this even when one tries to be careful.. Thanks for reporting back @scxs535 :-) |
for me no , I have removed the integration and now Nuovo tentativo di configurazione: DeviceException during setup of xiaomi gateway with host {self._host} |
I tested on my setup with gateway.v3 and both the alarm, illumination and light entities all work on the latest 2012.12.2 release. @maury77 do you have anything else in the log? |
The cloud connectio si ok configuration but dic 16 09:42:19 sdomotica homeassistant[32525]: 2021-12-16 09:42:19 WARNING (MainThread) [homeassistant.config_entries] Config entry 'hub mare' for xiaomi_miio integration not ready yet: DeviceException during setup of xiaomi gateway with host {self._host}; Retrying in background Seems a timeout but the device is reacheble I upgrade the version of the device to 3.1.3_0004 |
@maury77 did you try power cycling the hub (plugin out, wait 15 seconds, plug back in)? |
In this moment I can't turn it off because the gw is in other city, before but i also updated the firmware therefore the combination of new firmware and new Ha has never been tested |
@maury77 if possible could you try the old HA version 2021.11.X with the new firmware to make sure it is not a firmware problem? |
I dont have a aqhm01 gateway (I have v3) so I cant test myself, the .v3 gateway works with HA 2021.12.2 |
With last version and reboot now is ok |
see home-assistant/core#61234 (comment)
the new python-miio release broke the alarm and light entity of the gateway
(by rytilahti: the click support was never working for these "subdevices" as they require to be initialized with the gateway instance. this fixes the issue by avoiding calling
info()
/accessingmodel
– which is done automatically since #1038 – on a device instance that has no host nor token.)