jaraco / jaraco.abode

MIT License
11 stars 9 forks source link

Add support for abode light_bulb type device #24

Closed darrick closed 1 month ago

darrick commented 8 months ago

I'm using Home Assistant so needed to make this work for v3.3.0. And I'm not sure if it's possible to create a PR for a tag.

I also don't understand how your test framework works. I'm a bit new to python.

Below works on my end. The control_url didn't work for set_status or set_level but the integrations/v1 url did. I mostly just used the firefox debugger to see what the goabode dashboard was doing and copied that. I believe what may need some fixing is the self.update(response_object) call in the set_level function. As when the bulb is off and you set_level the status change isn't reflected in home assistant.

I can do a PR to to main after testing with the abode cli if you'd like.

And if anyone else stumbles across this I enabled it by copying the core abode component to /custom_components/abode and then in the manifest.json added a version and changed jaraco.abode requirement to point to my fork:

"version": "0.1.0", "requirements": ["git+https://github.com/darrick/jaraco.abode.git@abode_light_bulb#jaraco.abode==0.2.2", "jaraco.functools==3.9.0"]

https://github.com/jaraco/jaraco.abode/compare/v3.3.0...darrick:abode_light_bulb?expand=1

jaraco commented 6 months ago

I also don't understand how your test framework works. I'm a bit new to python.

Fair. The guidance is hidden behind the "skeleton" badge in the readme, which links here. That doc describes how to run tests. Basically, have tox installed then run tox. Some recent systemic changes mean the tests are currently failing. I'll get that fixed promptly.

I can do a PR to to main after testing with the abode cli if you'd like.

I'll grab your code and get one started.

jaraco commented 1 month ago

In #26, I adapted darrick's code to work with the latest code, but found it wasn't working and did not have adequate test coverage.

I've added some guidance on implementing new devices, which may prove helpful in generating tests.

I welcome you or others to work from the PR I created, which aligns with the latest jaraco.abode changes.

For now, I'm closing as the interest seems to have waned, but I'm happy to reopen and revisit as needed.