Which (in my opinion) should send me a Telegram notification (Telegram setup successfully tested with other notifications) as soon as the humidity level is higher than 40%
Long story short: It does not work. Has anyone some ideas how to troubleshoot? How to manually trigger the alert?
Copy and paste your template {{ states.sensor.humidity_ABC }} in Developer Tools/templates for testing it.
There you will see that it not returns the value you expect.
You need {{ states.sensor.humidity_ABC.state }} to get the value and maybe | int if the sensor returns a string.
You were right. with the “.state” added at the end I get the humidity-value in the template-section formatted as 48.33
Thanks for that. Nevertheless the alert is still not working and I have no idea why.
Should be ‘on’ if value > 40.
Have you tried {{ states.sensor.humidity_ABC.state | int > 40 }} for the value_template?
If you test it in the templates tool it should show ‘True’ (=‘on’) or ‘False’ (=‘off’) if the value is under 40.