Dynamic positions in picture-elements card

Hi all

With the following code I show my rooms with any entities:

type: picture-elements
  - type: state-badge
    entity: sensor.lumi_lumi_weather_temperature
      top: 73%
      left: 20%
      transform: scale(1,1)
      color: Transparent
        ha-state-label-badge: null
        .: |
          :host {
            color: orange;
            --label-badge-background-color: white;
            --label-badge-text-color: black;
            --label-badge-red: red;

I’m using espresense to detect my devices inside my rooms.

Inside the picture-elements card, is it possible to change the positions (left and top) from a state-badge, state-icon etc. based on a state from one of this espresense entitites?

For exmpales:
if the phone is in my office (buero) then the position should be: left: 20% and top: 65%
if the phone is in the kitchen then the position should be: left 70% and top 45%

Is this possible with card-mod or in any other way

Thanks and best regards

Please check out this extensive guide

@LiQuid_cOOled thank you very much for your quick reply. I will test it with the conditions. Best regards Buhli