Replies: 2 comments 2 replies
-
Makes sense, I've created an issue for this: #22 I think the best way to handle it is to allow the FreeAtHome class to take an I also agree an allow list would be best, I'd propose this be driven by the HA integration. We should keep in mind if a new interface pops up that we want to include it'll have to be included in a new version of the HA integration. |
Beta Was this translation helpful? Give feedback.
-
@derjoerg , I've opened a PR to include device filtering. If you could specifically check the new https://github.com/kingsleyadam/local-abbfreeathome/pull/26/files |
Beta Was this translation helpful? Give feedback.
-
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:[email protected]" > 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.
Beta Was this translation helpful? Give feedback.
All reactions