Device Entities into attributes

I have Aqara door sensor that connected to my homeassistant via Sonoff Zigbee 3.0 dongle. In homeassistant there is one device for aqara sensor and 4 entities of that device. So I’m using @matt8707 's dashboard design and i want to add temperature and battery percentage readings to this button. But i couldn’t manage to add one button for all states of entities. If it was one entity and the attributes it was so easy to setup that way.

I added some screenshots so you can understand what i mean. Below you can see right bottom corner i have a door sensor. The second screenshot, you can see my entities for one device. This is my example template script. for my door sensors.

person:
  template:
    - base
    - circle
  state_display: >
    [[[
      if (entity) {
          return variables.state === 'home'
              ? variables.translate_home
              : variables.state === 'not_home'
                  ? variables.translate_not_home
                  : variables.state;
      }
      return variables.translate_unknown;
    ]]]
  triggers_update: sensor.time
  tap_action:
    action: none
  styles:
    grid:
      - grid-template-areas: |
          "icon  icon circle  circle"
          "n     n    n       n"
          "s     s    s  weight"
      - grid-template-columns: repeat(4, 1fr)
      - grid-template-rows: auto repeat(2, min-content)
      - gap: 1.3%
      - align-items: start
      - will-change: transform
    custom_fields:
      icon:
        - clip-path: circle()
        - width: 82%
        - pointer-events: none
        - display: grid
      weight:
      - justify-self: end
  custom_fields:
    icon: >
      [[[
        return entity && variables.entity_picture
            ? `<img src="${variables.entity_picture}" width="100%">`
            : null;
      ]]]
    weight: |
      [[[   
        return `<span>${states[variables.entity_weight].state}</span>`
      ]]]

Screen Shot 2023-06-10 at 16.11.54