Get the friendly name of an entity in a template

i´m using this template to see the what´s triggering the sensor.highest_humidity_inside:

{{ state_attr('sensor.highest_humidity_inside','max_entity_id') }}

this returns sensor.multisensor_bedroom_humidity.

However this looks bad on the dashboard, so is there a way to display the friendly name of that sensor?

1 Like

got it, maybe some else needs this at some point:

{{ state_attr(state_attr('sensor.highest_humidity_inside', 'max_entity_id'), 'friendly_name') }}

1 Like