Closed kingsleyadam closed 1 week ago
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 | ✔ |
Tests | Passed ✅ | Skipped ⏭️ | Failed ❌ | |
---|---|---|---|---|
JUnit Test Report | 61 ran | 61 passed | 0 skipped | 0 failed |
Test | Result | |
---|---|---|
- | No test annotations available | - |
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 anUNDEFINED
interface. AnUNDEFINED
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:
get_devices_by_function
we'll pass in the the Enum object vsvalue
.get_device_by_class
we'll loop through the values since the key isn't being used here.