How to convert dpt coming from knx and sending it back as a differnet dpt?

Hi all,

hope I am doing it right - following question I can not find an answer on. Hopefully you are able to help :slight_smile:

goal: show temperature (dpt 9.001) and humidity (dpt 9.007) on a mdt switch which needs the status as ascii (dpt 16.000)

As far as I know, I can not handle this convert in the KNX eco system itself. So I guess I have to send the temp with group address e.g. 1/1/1 to HA which then converts it to an ascii value and then publishes it on KNX again on a different group address e.g. 1/1/2.

But how can I handle this?

Thanks!

Hi :wave:!
One way to handle this would be to create a sensor entity for the humidity and use expose on that entity to send it back to Knx in your desired DPT.
https://www.home-assistant.io/integrations/knx/#exposing-entity-states-entity-attributes-or-time-to-knx-bus

1 Like

This looks very promising :slight_smile: Thanks! I’ll check this later today!

Just wondering: You mentioned that this is one way - what are the others?

You could use an automation with knx_event and knx.send too. Or use an entity as trigger and Knx.send. That can be helpful if you want to do some calculations etc. on the value before sending it to Knx.

thanks a lot!

The expose idea from your first post worked like a charm :slight_smile:

In my case I would like to add “%” after the humidity value and “C” after the temperature. Can you meld me with an example for the automation?
I think it should be something like:

alias: ForwardHumidityOnKnx
description: “”
trigger:
-platform: knx
entity_id: myEntityIdOfTheHumiditySensor
action:
-service: knx.send
data:
address: 1/2/3
payload: {{ data + “%” }}
mode: single

You’ll need to set a type for knx.send.