mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 07:17:14 +00:00
Include notes about entity_ids that start with a number (#2531)
* Include notes about entity_ids that start with a number Based on info discovered by @armills in forum thread: https://community.home-assistant.io/t/google-maps-as-a-card/9382/40 Wanted to update the docs as I had never run into this before nor had I seen it in the docs. * Updated based on input from armills * Format as code
This commit is contained in:
parent
a7d3998b1b
commit
d55ec3008e
@ -89,6 +89,11 @@ Home Assistant adds extensions to allow templates to access all of the current s
|
||||
|
||||
[strp-format]: https://docs.python.org/3.4/library/datetime.html#strftime-and-strptime-behavior
|
||||
|
||||
<p class='note warning'>
|
||||
If your template uses an `entity_id` that begins with a number (example: `states.device_tracker.2008_gmc`) you must use a bracket syntax to avoid errors caused by rendering the `entity_id` improperly. In the example given, the correct syntax for the device tracker would be: `states.device_tracker['2008_gmc']`
|
||||
</p>
|
||||
|
||||
|
||||
## {% linkable_title Examples %}
|
||||
|
||||
### {% linkable_title States %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user