Trigger from a sensor of a device and control this specific device

I would like to make an automation generic for all my covers.
I need to call a service to refresh the position each time the cover ends it course.
To know when the movement is ending, I monitoring the consumption going back to 0.0.

Currently, I have this for one cover:

  - entity_id:
      - sensor.volet_chambre_electric_consumption_w
    platform: state
    to: "0.0"
  - service: zwave_js.refresh_value
      refresh_all_values: false
        - cover.volet_chambre

Both sensors belong to the same device:

I want to add all my covers to the trigger (or maybe even a group of covers) and have a generic code for the service call of zwave_js.refresh_value that will refresh the state of the triggered cover.

The ugliest solution I know would be extract the entity_id of the trigger and reconstruct the name of the entity for the service call. So text base derivation from sensor.volet_chambre_electric_consumption_w to cover.volet_chambre.

Is it possible to get the cover entity from the consumption entity?