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

Limiting devices by interface #22

Closed kingsleyadam closed 1 week ago

kingsleyadam commented 1 week ago

Discussed in https://github.com/kingsleyadam/local-abbfreeathome/discussions/17

Originally posted by **derjoerg** October 9, 2024 From my perspective it makes sense to remove unnecessary devices within the function "get_devices_by_function". So either by implementing a whitelist or a blacklist regarding the content of the device-field "interface". IMHO I would prefer a whitelist-approach as it gives the most control over the result. What I see in my installation is the following: **!!! the field "interface" isn't available in a device !!!** > I have this for all my wireless "Smoke/Heat Detectors" and "Carbon Monoxide Sensors". But also groups (e.g. Light Group) has not field "interface". I would propose to process these devices **interface = "TP"** > the default wire-connected devices. Process them **interface = "vdev:installer@busch-jaeger.de"** > This is shown for my virtual devices I created through the REST api. I would propose to process them **interface = "sonos"** > for now I would ignore them **interface = "hue"** > for now I would ignore them For the beginning - as the library is only used for HA - I would implement this as a static list in the class "FreeAtHome". Later, when everything is more mature it might be a good idea to make this list configurable from the outside, so that e.g. default is to return everything and the HA-integration can limit it. I just don't know how complicated such a configurable list can be implemented so I would move this to later as the core functions are more important.