Connect MQTT topic to a light

Dear list,

I’ve tried hard, really hard, to understand the concept behind automations. I cannot, for the best of me, find a solution for the following problem:

  • I have a Tradfri dimmer that, through zigbee2mqtt, publishes a message whenever it is manipulated:
    zigbee2mqtt/0x000b57fffe11b778 {"linkquality":49,"rate":70,"brightness":26,"level":0,"battery":60,"action":"rotate_stop"}

  • I have a lamp that is connected through the same zigbee bridge, and that is called: light.0xd0cf5efffec853c9_light

My challenge is to find a way to forward the “brightness” value to the lamp. Just that. I have difficulty to believe that this seems to be so nontrivial in Home Assistant.

A few important conditions:

  • I know I can bridge the dimmer to the lamp directly, but I have a use case in mind where both devices are not connected using the same zigbee2mqtt bridge;
  • I would like to use a single automation, if possible. Keeping multiple automations for one function quickly becomes a mess;
  • I don’t want to keep track of brightness in the automation. The single purpose should be to forward the brightness value from the dimmer to lamp.

Some questions:

  • If I would use multiple dimmers, can I somehow have the 2nd one ‘continue’ operating on the value previously set by the other ?
  • How was HA designed to perform this seemingly simple task ? I.e. how am I supposed to do this ?
  • Can I do this in the HA automation editor ?
  • If I edit automations.yaml by hand, how to re-read this file without restarting HA entirely. Performing restarts at night with half the house automated has a negative WAF.

I’d be glad if someone could give just a few clues on which direction I should be looking for a solution, i.e. best practice. Maybe even AppDaemon ?

Thanks.