KNX fan component


I needed a fan component for my KNX installation (see there: KNX & ventilation )
I now have a working component on my setup. Can start/stop the fan and change the speed (percentage based).
I am facing this issue in XKNX: , waiting for some reply there. The meens that 0% turns the fan to 100% (25 -> 75).
As i am not at all a python dev, could someone check and cleanup my code ? And maybe push it to the repository ?



You did not post your code - or did I miss this.
Inverting this is quite easy, just use 100-value instead of value

The xknx/devices/ file:
The homeassistant/components/fan/ file:

Needs an import in xknx/devices/ “from .fan import Fan”

I know how to hack the percentage problem but would be better if the source error in xknx was fixed.

And the xknx/core/

For sure this is an older thread, but I’m also having some issues with this.

I coupled my knx with an ubbink ventilation system, that’s working fine and I do have (at this moment) 4 settings I can choose from (like 25-50-75-100%), all working fine with a press on the button.

I even managed to make it possible with HA to manage my fan by making it seen as a dimmable light. Pressing around 50% will turn it to 50% as an example.

But… While i do get feedback when I press in HA on a value (I can see it change on my MDT Glastaster), I don’t get any other feedback on my other devices.

For example:

  • pressing on my HA-app on my smartphone does change the value + I see this on my wall-device
  • pressing on my wall-device will change the value, but I don’t get any feedback on my smartphone
  • pressing on my smartphone will not change the value in the HA-app on another device like my tablet or laptop.

Still will experiment some around, I do hope to find an (easy) way around this.

Not the best looking, but at this moment I work around with 1 “light” and 1 “sensor” entity.

With the slider of my “light” I can choose anywhere between 0 and 100 percent. This will update my bar below it and also the value on my knx is displayed like it should. (It changes on all devices now, both Android as knx)

One small problem is my slider always moves back to 0 (cause it sends the state to my knx, but can’t read it with the same entity) after a little while, but that’s ok and of course it does not change the actual value when it does… Might find a solution for this later on if I got some more free time to spare. Maybe it’s even as simple as customizing a bit in yaml. But haven’t had time to try it.