Is it possible to get a sensor info into a friendly name?

Hi

I would like to show the date of the next release of the Home Assistant Beta which is the easy part BUT I would like to include the build name in the friendly name… that possible ?

I have tried wrapping 2 x {{ and also 3 x {{{ the sensor to see if that works as you can see below but not sure if it will never work or if I am doing it wrong

- platform: template
  sensors:
    next_home_assistant_devs_countdown:
      friendly_name: Home Assistant New Release {{{ states(calendar.home_assistant_devs.attributes.message) }}}
   

Thanks in Advance

so Friendly Name would show for example. Home Assistant New Release 0.115 and then the date or days to go. Which I have currently set to show days to go and its now 10

Martyn

Try this:

{{ state_attr(calendar.home_assistant_devs.attributes.message) }}

For attributes, you have to to use state_attr instead of simply state

unfortunately that doesnt work either.

Im thinking you cant have this in the friendly_name as it just sees it as text.

Thanks

Martyn

I have a sensor that changes the friendly_name depending on the value of the sensor.
You need to use

friendly_name_template:

1 Like

Hi

Thats great news. Thank you.

image

Thanks

Martyn

I’m glad you changed that.
I was on my mobile trying to work out how I could get a meaningful screenshot :joy:

1 Like

Ha ha. It dawned on me very quick after putting the original reply. Thanks again. Never knew this existed and opens upa few more ideas for me.

Hello. Where does that entity come from? Do I have to configure something? Thanks

OP configured a calendar with the name, so you have to create the same calendar

Perfect. Add the event that is on the web https://developers.home-assistant.io/ and the entity appeared. Thanks a lot