How to create an Automation that displays in Notifications

As a small learning step, I’d like to display a number in the Notifications. This is my (non-working) yaml:

A couple of questions.

  1. What would be the correct command to read this sensor?
  2. Why is the sensor I am hoping to use not listed in this pop-up?

Regards, Martin

As a good practice, post your code, formatted with the </> icon.

As a second good practice, test your yaml in the dev tools
If you test Reading now is: {{ states', it would have tell you what was wrong because states is a function that require a parameter.
And parameters are surrounded by parenthesis.

Why is your sensor not in the list? I can’t tell because there is a scroll bar and s is after d in the alphabet.

EDIT: As an exemple to help you, here are a few tests I did especially for you

{{ state_attr('climate.thermostat','temperature') }}
The time is {{ now().strftime('%-I') }} o'clock
Reading now is: {{ states('sensor.annif_olivier') }}

Result:

20
The time is 11 o’clock
Reading now is: 10.14

Understood. But I wanted to show the (incomplete?) drop-down list. And on that point, the list is not very long and does not go beyond d.

Ok, if you go to developer tools > states (My HA is not in English, you might have to search)
Then, in the filter entities box, start typing smart_ does it show? If yes, copy/paste