Oh, I already have some templates in my configuration, so far so good. But with some “storage_sensor” attributes I don’t get along, I can’t read these attributes.
The sensor is “sensor.mymobile_storage_sensor” and one of the attributes I want to use is “Free external storage: 33GB”. Yes, written this way, including spaces…
I have tried to replace the spaces with “_” and I know the text in the documentation that says:
*When an attribute contains spaces, you can retrieve it like this: * states.sensor.livingroom.attributes[“Battery numeric”].
Nevertheless, none of my attempts were successful.
Did any of you manage to read these attributes and what does the code look like?
Wow, solved! Thanks a lot Burningstone!
It can be so simple… And I always thought “spaces” are strictly to be avoided. Obviously not… However, this contradicts the documentation completely, it says clearly:
When an attribute contains spaces, you can retrieve it like this:
states.sensor.livingroom.attributes[“Battery numeric”].
In deed, obviously I had an error inside in my attempts. I have now checked both versions again and both work correctly as you showed. For the now, I am using the variant: