How to dimm Zigbee Light (Tradfri) from KNX

Hi folks,

very nice community!
I’m in “reading mode” since about one year and now i have my first question, as i did not find a solution up to now.

My primary installation in my house is KNX - fully integrated in HA and it works fine!
The Installation was not KNX from the beginning, i startet to switch to KNX from “normal” Installation 2 years ago.
Now i added some Zigbee (IKEA Tradfri) lights to some lamps, where it is not that easy to control them with KNX. The Integration in HA is also very fine and works very well!

I was able to report all Zigbee states (on/off, brightness) from Zigbee to KNX (expose) and I’m also able to control the zigbee lights with KNX switches (on/off).
The only think i did not get to work, is dimm the Zibee lights out of KNX!

I have the following config:

KNX Light:
  - entity_id: kg_buro_stehlampe
    address: '21/1/3'
    state_address: '21/1/2'
    brightness_address: '21/2/8'
    brightness_state_address: '21/2/6' 

ZigBee Light:
  - entity_id: kg_buro_stehlampe_tradfri

KNX Expose: (to see the Zigbee states in KNX)
  - type: binary
    entity_id: light.kg_buro_stehlampe_tradfri
    address: '21/1/2'
    default: none
  - type: percentU8
    entity_id: light.kg_buro_stehlampe_tradfri
    attribute: brightness
    address: '21/2/6'
    default: none

Automation: (to switch Zigbee on/off from KNX)
- alias: kg_buro_stehlampe_state_knx_to_tradfri
  - platform: state
    entity_id: light.kg_buro_stehlampe
  - entity_id: light.kg_buro_stehlampe_tradfri
    service_template: >
      {% if is_state('light.kg_buro_stehlampe', 'on') %}
      {% else %}
      {% endif %}

How should an automation look like, to control the Zigbee brightness from KNX?

Thanks for your help!

Best Regards


Thanks! I know this blueprint, but it is not what I’m searching for.
I want to have an automation, that takes an absolut brightness from KNX and set this brightness to my Zigbee light.
Similar to the automation I have for the state to switch the Zigbee light on/off using KNX.

Use knx_event (configure event_filter: before) - but you would need to deal with raw data.
Or configure a knx sensor for the brightness % (type: percent or percentU8 if you want 0…255 directly) with always_callback: true and use it’s state change event.

can you made it to the blueprints