kingsleyadam / local-abbfreeathome

A Python Package for interacting with the ABB (Busch Jaeger) Free@Home System via the Local API
MIT License
3 stars 2 forks source link

Allow for filtering of devices by interface #26

Closed kingsleyadam closed 1 week ago

kingsleyadam commented 1 week ago

This addresses #17 by allowing for filtering of devices by interface.

I've added a new enum for interfaces to make it clear what can be filtered on, and to be able to use an UNDEFINED interface. An UNDEFINED lines up with a device that doesn't provide an interface at all. Some scenes, virtual devices, and other devices do not provide an interface.

This will be passed to the FreeAtHome class as a new variable interfaces and any calls to the class will filter out the devices by this list. If the variable is not provided then there will be no device filtering.

I've adjusted the unit test to include a hue device to test against this filtering scenario.

Some other quality of life improvements to this PR:

github-actions[bot] commented 1 week ago

Code Coverage

Package Line Rate Complexity Health
.opt.hostedtoolcache.Python.3.12.7.x64.lib.python3.12.site-packages.abbfreeathome 100% 0
.opt.hostedtoolcache.Python.3.12.7.x64.lib.python3.12.site-packages.abbfreeathome.bin 100% 0
.opt.hostedtoolcache.Python.3.12.7.x64.lib.python3.12.site-packages.abbfreeathome.devices 100% 0
Summary 100% (1062 / 1062) 0
github-actions[bot] commented 1 week ago
TestsPassed ✅Skipped ⏭️Failed ❌
JUnit Test Report61 ran61 passed0 skipped0 failed
TestResult
-No test annotations available-