How to get device unique_id from device_name

I would like to create a persistent notification, that links to the device-page in configuration.
I could extract the device_name from the triggering entity with string manipulation, but how do I get the corresponding device unique_id, which seems to be part of the url for the device-page of a specific device?

Or even better: is there a way to get the parent-device to an entity, preferably even the unique_id?

device_id(entity_id) returns the device ID for a given entity ID or device name. Can also be used as a filter.
Templating - Home Assistant

1 Like

Perfect!
Believe me I searched, but I guess not good enough :frowning: