Remove bad state attribute access example from state_object page (#17385)

This commit is contained in:
Franck Nijhof 2021-04-10 15:54:47 +02:00 committed by GitHub
parent 2ebab6fb75
commit de2ba9e145
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,4 +32,4 @@ When using templates, attributes will be available by their name. For example `s
| `assumed_state` | Boolean if the current state is an assumption. [More info](/blog/2016/02/12/classifying-the-internet-of-things/#classifiers) Example: `True`. | | `assumed_state` | Boolean if the current state is an assumption. [More info](/blog/2016/02/12/classifying-the-internet-of-things/#classifiers) Example: `True`. |
| `unit_of_measurement` | The unit of measurement the state is expressed in. Used for grouping graphs or understanding the entity. Example: `°C`. | | `unit_of_measurement` | The unit of measurement the state is expressed in. Used for grouping graphs or understanding the entity. Example: `°C`. |
When an attribute contains spaces, you can retrieve it like this: `states.sensor.livingroom.attributes["Battery numeric"]`. When an attribute contains spaces, you can retrieve it like this: `state_attr('sensor.livingroom', 'Battery numeric')`.