jaraco / jaraco.abode

MIT License
11 stars 9 forks source link

Handle generic_type param as a list instead of str #13

Closed tradel closed 1 year ago

tradel commented 1 year ago

Fixes #12

tradel commented 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.

jaraco commented 1 year ago

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.

tradel commented 1 year ago

Thanks @jaraco! I'll rerun the tests in homeassistant and confirm the fix. Thanks for merging the PR so quickly!

tradel commented 1 year ago

Homeassistant unit tests passed after updating to 3.1.1 and making a few changes:

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!

image
jaraco commented 1 year ago

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.