Setting a dynamic value towards an KNX group

I want to set the pwm value I calculate within HA set to the PWM controller in my KNX network.

Using the following YAML code in "Call a service ‘KNX’: Send to KNX bus’
service: knx.send
address: 2/4/0
type: percent
payload: “{{ [states(‘sensor.woonkamer_pwm_after_correction’) | int ] }}”

Fixed values are working.
For above dynamic value I get the following error message “Message malformed: template value should be a string for dictionary value @ data[‘action’][0][‘data’]”

Am I doing something wrong?

The template in your text is different to the one in your screenshot. The one in the screenshot works on my system.

You are right, corrected it an now it is working.

1 Like