Force entity ids of PlexMediaPlayers?

I’ve got 2 Pi’s running PlexMediaPlayer, one in the lounge and one in the kids’ playroom. They get given media_player.plexmediaplayer and media_player.plexmediaplayer_2 ids, and I have automations based off one of those entity ids.

However when I restart HASS it seems to swap them over at random, which breaks the automations. Is it possible to force them to get specific ids?

Cheers!

Justin

In case anyone else needs to solve this, the issue actually relates to the hostnames of the plex clients themselves.

All you need to do is change this bit of /storage/.local/share/plexmediaplayer/plexmediaplayer.conf

“openelec”: {
“systemname”: “plexmp-ryanb”
},

You can change that to something like PlexLivingRoom or whatever and then automate based off that unique name,