Hello!
For an automation I need to iterate on all attributes of a sensor. I’m stuck because I don’t find how to access the attribute list for this specific sensor.
In the template page i’ve tried the following
This works but this is not the sensor i’m interested in :
{{ states.sensor.backup_state.attributes }}
This generate the error “TemplateSyntaxError: expected token ‘end of print statement’, got ‘_weather_alert’” :
{{ states.sensor.94_weather_alert.attributes }}
My guess is that’s because the sensor id starts with numbers but I can’t figure out a way to solve this.
Can you please help me ?