Accessing entity registry values in an Automation

Hi, is there a simple way to access the values stored in entity registry. I can’t seem to access all the values. Below is a chunk of my entity_registry.yaml file:

name: Media Room
platform: squeezebox
unique_id: de:62:58:88:37:da

Specifically in an automation I want to use the unique_id field. I can access name field but not unique_id (mac address) unfortunately

Any help would be appreciated. Ynot.

You cannot, why do you want to do this anyways?

I needed the mac address of the device for use with synchronizing players in squeezebox. I simply added a custom attribute for these media players called playerid in custom.yaml which carries the mac address.

The sync command required mac address only. Thanks anyway, just seemed like something I should be able to access as it is there for all to see in the entity_registry.yaml


You can probably access those attributes with a custom component, but not yaml+jinja.

Got it. Think I will use the custom.yaml approach as its simple for others (including myself) to understand.

1 Like