KNX: Add device type for doors / gates / locks + modify fan

More or less cosmetics to allow the devices to be used for what they are in HA instead of them being covers / switches

Door / Gate
Should be pretty simple, since it’s basically the same, or simpler, as the “cover” device type, with the difference, that it is recognized as a gate or door. Don’t know if it’s the same as a lock. But lock doesn’t exist either for knx device type.

Modify the fan device type to allow for simple ON / OFF switching mode DPT1. Some fans are just turned on and off. So I use a “switch” to control them. But then in HA, HA doesn’t understand it’s a fan, which limits the use of certain cards.

Hi :wave:!
You can configure a knx covers device_class for door etc.
For the fan issue I would suggest switch_as_x to convert a switch to a fan until maybe this gets picked up again https://github.com/home-assistant/core/pull/73131.

Lock is indeed not supported. What would be its functions? I don’t know of any Knx lock. If it is only a switch you can, again use switch_as_x.

1 Like

Hi Matthias
Wow, switch as x, so cool! I didn’t know this. Very handy! Yea, that solves it pretty much!
Some door locks are just connected to a KNX actuator.

As for the cover for the garage door. Yes, I did that. It works, but the difference becomes clear in HomeKit. Before I was using a Thinka homekit bridge. There the garage door was in fact a door. In homekit this was then treated as a door and was thus treated with more security. For example it could not be put into certain automations for security reasons, and it being opened and closed was also treated differently.

tbh. I don’t really know if that is so important. However it always kinda bothers me a bit, if something is being treated as something it really isn’t… a garage door is not a cover. Ok, but I admit I’m a bit un-sane in that regard :wink:

switch_as_x works for me using the UI.

I am converting a KNX switch

knx:
  switch:
        - name: "G0095 Fan Guest House Master Bathroom"
          address: "0/2/0"
          state_address: "0/2/1"

into a home assistant fan.

However, can this be done via YAML as well? There is an older post which explains that this works for lights but I can’t get it working for a fan?

Thanks
Martin