Closed tradel closed 1 year ago
@jaraco the background on this is that I'm trying to update the Abode component in Home Assistant to use your library instead of the original abodepy
. Took me quite a while to figure out why Home Assistant wasn't detecting any binary sensors after that. It's because that particular component passes in a list of generic_types. With this small change, all the unit tests in jaraco.abode
and homeassistant
pass.
Thanks @tradel for the PR. I'm excited to hear about the effort to transition homeassistant. I'm highly motivated to support that effort and glad to hear that only this one change has led to disruption. You may have noticed that there has been massive investment in refactoring and maturing this library, so I'm pleased to hear that compatibility has been largely maintained (as intended).
I agree this fix is probably appropriate, though I'd like to ensure that jaraco.abode
tests fail without this patch as well (so such a regression is prevented in the future). I'll get this out soon. Thanks for the report and contrib.
Thanks @jaraco! I'll rerun the tests in homeassistant and confirm the fix. Thanks for merging the PR so quickly!
Homeassistant unit tests passed after updating to 3.1.1 and making a few changes:
from jaraco.abode.automation import Automation as AbodeAuto
instead of from abodepy import AbodeAutomation
)Client
constructor (looks like you got rid of caching in 3.0?)/root/.local/share/Abode
folder for the shelved cookie jar. I haven't looked at the code for jaraco.net
yet, but maybe it needs to check whether the path exists before trying to save the cookies?event_controller.py:189
has a typo: .values
should be .values()
._on_websocket_connecting
from socketio.py
, which causes an ignorable AttributeError
. I added code to suppress the exception.ShelvedCookieJar
does not implement a get_dict()
method, which causes event_controller.py:172
to fail. I added a quick and dirty implementation.With these changes, HA passes the unit tests. I can add the Abode integration to HA and it correctly detects the Abode Cam 2 devices!
That’s great news. Some of these changes were intentional. See the change log (the rendered History in the docs has dates and links). There were earlier releases with more compatibility and backward incompatible releases with specific changes.
Some of the compatibility you describe looks to be unintentional, though, so I’ll plan to investigate. Any contributions welcome.
Fixes #12