Need help with mqtt template syntax

Hi,

I have 4 TRV (Eurotronic Spirit Zigbee), connected via zigbee2mqtt --> mqtt broker --> home assistant.

Now I want one TRV1 to be the “master”: physical modifications on TRV1 should be duplicated on TRV2, TRV3 and TRV4.
In example:

  • raise temp (not with the app, but by touching the buttons on the TRV) on TRV1 will raise temp on other TRV’s
  • set TRF to “off” --> same on other TRV’s etc…

When I manipulate temperature buttons on my TRV1, I receive messages like

Client mosq-NIZNJv1orsqEb3jAbS received PUBLISH (d0, q0, r0, m0, 'zigbee2mqtt/0x00158d0001ff8bca', ... (373 bytes))
{"pi_heating_demand":1,"linkquality":102,"local_temperature":23.5,"occupied_heating_setpoint":18,"unoccupied_heating_setpoint":16,"current_heating_setpoint":21,"eurotronic_error_status":0,"eurotronic_host_flags":{"mirror_display":false,"boost":false,"window_open":false,"child_protection":false},"system_mode":"auto","eurotronic_system_mode":1,"battery":30,"battery_low":0}

How can I use the value of
current_heating_setpoint":21
and duplicate it to other TRV’s?

I already created an automation like


- alias: radiator_gang_set_temperature
  initial_state: 'on'
  trigger:
    platform: mqtt
    topic: zigbee2mqtt/0x00158d0001ff8bca/set/current_heating_setpoint

  action:

    # ----------------------------------
    # radiator gang
    # ----------------------------------
    # - service: mqtt.publish
    #   data_template:
    #     topic: zigbee2mqtt/0x00158d0001ff8bca/set/current_heating_setpoint
    #     payload: '{{ trigger.payload }}'

    # ----------------------------------
    # radiator badkamer
    # ----------------------------------
    - service: mqtt.publish
      data_template:
        topic: zigbee2mqtt/0x00158d0001ff904f/set/current_heating_setpoint
        payload: '{{ trigger.payload }}'

    # ----------------------------------
    # radiator slaapkamer
    # ----------------------------------
    - service: mqtt.publish
      data_template:
        topic: zigbee2mqtt/0x00158d00053d4000/set/current_heating_setpoint
        payload: '{{ trigger.payload }}'

    # ----------------------------------
    # radiator woonkamer
    # ----------------------------------
    - service: mqtt.publish
      data_template:
        topic: zigbee2mqtt/0x00158d00053d404d/set/current_heating_setpoint
        payload: '{{ trigger.payload }}'

and this works if I use the app for setting the temp, based on

  trigger:
    platform: mqtt
    topic: zigbee2mqtt/0x00158d0001ff8bca/set/current_heating_setpoint

However, If I manipulate the physical buttons on the TRV, I do NOT receive the same trigger. I only receive messages like

Client mosq-NIZNJv1orsqEb3jAbS received PUBLISH (d0, q0, r0, m0, 'zigbee2mqtt/0x00158d0001ff8bca', ... (372 bytes))
{"pi_heating_demand":1,"linkquality":94,"local_temperature":22.5,"occupied_heating_setpoint":18,"unoccupied_heating_setpoint":16,"current_heating_setpoint":18,"eurotronic_error_status":0,"eurotronic_host_flags":{"mirror_display":false,"boost":false,"window_open":false,"child_protection":false},"system_mode":"auto","eurotronic_system_mode":1,"battery":30,"battery_low":0}

So I probably need a template that extracts the value of
"current_heating_setpoint":18
from the above messange, so that I can use it in my automation

    - service: mqtt.publish
      data_template:
        topic: zigbee2mqtt/0x00158d00053d4000/set/current_heating_setpoint
        payload: '{{ trigger.payload }}'

But I don’t now how to extract the value.

Any help appreciated!
Kind regards,
Bart