WTH does the KNX integration not use the HA device abstraction, only entities?

There is no single “correct mapping of abstractions” from the KNX domain to HAs language, but it seems a bit WTHish to me that it is not possible to define HA devices from KNX elements, only HA entities.

I realize that this is probably related to a general ambivalence in HA on the “device vs entity” definition, and that this definition is still evolving. For instance Device Registry | Home Assistant Developer Docs defines a device as “a physical device that has its own control unit, or a service”.

And as mentioned there is no single correct mapping from KNX, for instance my 10 output light thingy could be seen as one HA device or as several devices. And my room controllers could be defined as single devices or as a switch and a thermostat and a presence sensor for instance. My point is that I would expect to be able to configure “virtual devices” the way I want, which would then be treated as devices by HA just as any other device.

It is possible that there is nothing particular to KNX here, maybe what is needed is a general mechanism for configuring virtual devices, somewhat like template entities, only devices. I have not really thought this through yet. But, WTH :slight_smile:

Afaik it’s not accepted to configure devices in yaml.
Not sure if virtual devices are allowed.

I think you are right, but in my opinion that is a sort of “technical debt” in HA wrt “device vs entity”. I have not been using HA very long, but in that time the way areas can be used has evolved wrt this for instance. I plan to take a look at the code base in order to understand this better.

:+1: if you have any questions regarding the Knx integration feel free to join the xknx Discord server.
We are actually thinking of refactoring the Knx integration to a UI based configuration method. But at this point it’s more a vague idea and laying groundwork to get there :technologist:. We’d appreciate every help we can get.

1 Like