From 79921fa22d9e6dfea0a3e99c8927b82144f25621 Mon Sep 17 00:00:00 2001 From: ThinkPadNL Date: Wed, 3 Aug 2016 18:14:34 +0200 Subject: [PATCH] Update state_object.markdown (#725) Added explanation on how to retrieve a state attribute that contains a space as i ran into that yesterday: https://github.com/home-assistant/home-assistant/issues/2716 --- source/_topics/state_object.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/_topics/state_object.markdown b/source/_topics/state_object.markdown index 1f1a16425f3..35716de6b58 100644 --- a/source/_topics/state_object.markdown +++ b/source/_topics/state_object.markdown @@ -37,3 +37,5 @@ Attribute | Description `entity_picture` | Url to a picture that should be used instead of showing the domain icon. Example: `http://example.com/picture.jpg`. `assumed_state` | Boolean if the current state is an assumption. [More info](https://home-assistant.io/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`. + +When an attribute contains spaces, you can retrieve it like this: `states.sensor.livingroom.attributes["Battery numeric"]`.