Struggling to get dashboard to change based on room using espresence

I have tried to follow some YouTube videos with no joy. I can get the sensor to show in in MQTT presence and it picks me up in the right room. My code to setup the sensor in my configuration file is:

sensor:

One entry for each beacon you want to track

  • platform: mqtt_room
    device_id: phone:kevinpixel
    name: ‘Kevin Pixel’
    state_topic: ‘espresense/devices/phone:kevinpixel’
    timeout: 10
    away_timeout: 120

The bit I am struggling with is the code for the card to switch to a specific room, say my bedroom which shows up in MQTT room presence as mainbedroom (ESP32 device) when I walk in with my phone.

Any help would be great.

Anyone able to help ?