Have a Zigbee dimmer switch control Zigbee dimmer relays

I have two wall sconces that are not controlled directly by a typical light switch. I have just installed a Zigbee relay on each so they can be controlled remotely. I installed a Zigbee light switch dimmer elsewhere on the circuit. My intention is to control the sconces with the light switch using HA as the interpreter. I have created an automation that will turn the relays on and off when the light switch is pressed. I would also like to control the brightness of the relays using the same switch. However, I don’t readily see how I can do that in HA. I can create cards in the dashboard for each device, but how can I get the slider on one card change the slider on another?

With an automation.

What do I call in the automation? There isn’t an entity for brightness.

I can see the ability to increase and decrease brightness in the Actions section, but I am not finding the equivalent for triggers.

In my similar automation the trigger is

trigger:
  - platform: state
    entity_id: light.dining_table_lights

Hmm. I’m not sure how that translates for me. If my trigger is a state change for the light switch, that could be on or off. And how could I interpret a state change to be increasing or decreasing in brightness?

Do you know how those sliders work on the cards?

I’ve made some progress on this. In general it works, but I have some strange behavior. With this automation, I am able to turn on the two lights with the switch and dimmer adjustment will change the brightness of the lights. If I turn the lights off, then turn them back on, the lights come on, turn off, then come back on. I’m not finding it easy to understand YAML.

alias: LR Sconce Dimmer
description: ""
trigger:
  - platform: state
    entity_id: light.lr_sconce_switch_light
    attribute: brightness
condition: []
action:
  - service: light.turn_on
    target:
      entity_id:
        - light.lr_right_sconce_light_2
        - light.gledopto_gl_sd_001_light
    data:
      brightness: "{{ state_attr('light.lr_sconce_switch_light', 'brightness') | int(0) }}"
mode: parallel