Angle_state_address expressed in degrees on a 5.xxx dpt?

Hello,

I am integrating my louvered shutters (blinds) and I have a DPT problem on a cover.
The actuator module is a TXA207C from Hager.

Here is a capture of my configuration in approximation to my actuator configuration.

The problem is quite simple : on the actuator, the feedback of the slat tilt is expressed by the module in degrees but only between 0 and 180°, while home-assistant expects a result in % with a DTP 5.001 (https://www.home-assistant.io/integrations/knx/#angle_state_address )

- name: "Cuisine"
  move_long_address: '13/4'
  move_short_address: '13/204'
  stop_address: '13/204'
  position_address: '13/604'
  position_state_address: '13/1004'
  angle_address: '13/804'
  angle_state_address: '13/404'

If we take the raw value, without translation of the DTP, via the bus monitor.
Blades open horizontally, I read on the bus for group address 13/404: 0x00 (0 in decimal)
I go down one pulse (increase), 13/404 goes to 0x2D (45 in decimal)
another increase on 13/204 -> 13/404 goes to 0x5A (90 in decimal)
again an increase on 13/204 -> 13/404 goes to 0x87 (135 in decimal)
another increase on 13/204 -> 13/404 goes to 0xB4 (180 in decimal)
At this point, my blades are vertical, closed, if I increase again, the shutter goes down, so I am at 100% of the tilt, which corresponds to 180 in decimal ( … 180°) for the actuator.
So this TXA207C (and certainly the other Hager modules of this generation) the tilt feedback returns an angle ranging from 0 to 180°.

Now, let’s see what it does on the Home Assistant side.
On the Home Assistant side, I get a wrong percentage on angle_state_address, I get 70.58%, because Home Assistant with the DTP 5.001 makes (180 / 255) * 100 = 70.58.
So ~70% even though I am closed under KNX and in real.

I can not even say that the solution would be to use a DTP 5.003, because with this DTP, the translation of the feedback of the leds varies from 0° to 254°.
I think it is a DTP 5.xxx generic 0-180 raw (or 0x00 - 0xB4 if you prefer)

The problem occurs in the other direction too, from the angle_address entity to the KNX bus, home assistant sends a percentage that the actuator takes as an angle.

Of course, I keep in mind that KNX integration can’t be adapted to every manufacturer/configuration, but for the time being, Hager a big manufacturer, and I tell myself that I must not be the only one to have feedback in this form and that it may be a problem that others may have. Or maybe there is a solution on the KNX side or upstream.

Hi!
Current Hager seem to use % as well.
I’d suggest you create a converter function for % <> ° from the actuator to a dummy GA and use this in HA. You can do this with a knx Device or in HA. If you have some patience you may even use a HA-knx sensor with value_template for it :wink: https://github.com/home-assistant/core/pull/47734

Hello,

Ah, damn, the PR was not successful.

I’m going to see about plan B, in KNX logic module (?)
See perhaps, my plan C, change these modules, they are old and do not offer advanced possibilities of sun tracking.

Thanks anyway farmio.

Yeah, its a pity. You can however still do this using a HA template sensor entity and expose its value back to the bus.