Hello I have a sensorwith this attributes
risks:
- pollenName: Tilleul
level: 0
- pollenName: Ambroisies
level: 0
- pollenName: Olivier
level: 0
- pollenName: Plantain
level: 0
- pollenName: Noisetier
level: 0
- pollenName: Aulne
level: 0
- pollenName: Armoise
level: 0
- pollenName: Châtaignier
level: 0
- pollenName: Urticacées
level: 1
- pollenName: Oseille
level: 0
- pollenName: Graminées
level: 4
- pollenName: Chêne
level: 0
- pollenName: Platane
level: 0
- pollenName: Bouleau
level: 0
- pollenName: Charme
level: 0
- pollenName: Peuplier
level: 0
- pollenName: Frêne
level: 0
- pollenName: Saule
level: 0
- pollenName: Cyprès
level: 0
friendly_name: Pollens
And I want to create a sensor with the level for exemple Tilleul
I try this but IIt doesn’t work
value_template: '{{ states.sensor.pollens.attributes["risks"]["pollenName: Tilleul"]["level"] }}'
result :
Error rendering template: UndefinedError: ‘list object’ has no attribute ‘pollenName: Tilleul’
I don’t understand how to with - and :
Thank for your help