I have an automation and in its action I want to use a template that refers to the event entity friendly name.
I can access the current state via the states() call via states(trigger.event.data.entity_id) (note: no quotes). Does a similar mechanism exist do retrieve the attributes for the given entity id?
After some more investigation I was able to access the attributes using states[trigger.event.data.entity_id.split('.')[0]][trigger.event.data.entity_id.split('.')[1]].attributes.
A nice addition would be to add an attributes() call to simplify this code.