Can I read attribute of entity with Lambda

I need to read and print on display some attribute of entity.
for exaple: in HA I have one google calendar entity and I want to print on display the Titile:

I have created a text sensor:

  - platform: homeassistant
    id: calendar
    entity_id: calendar.famiglia

I use printf like this:
it.printf(X, Y, id(font), "%s", id(calendar).state.c_str());
and I have the status… but what is the way to have attribute: message, description, friendly_name, etc.??

thankyou in advance

1 Like

I think you need to turn them into template sensors in home assistant.

this is exactly what i’m dealing with and i can’t find any other way than making a ton of individual text sensors ready for initialization. what did you end up doing @fra290?