mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-16 13:56:53 +00:00
List all areas with templating (#26303)
This commit is contained in:
parent
3bc5a2b96d
commit
9026d0ad20
@ -369,6 +369,7 @@ The same thing can also be expressed as a test:
|
|||||||
|
|
||||||
### Areas
|
### Areas
|
||||||
|
|
||||||
|
- `areas()` returns the full list of area IDs
|
||||||
- `area_id(lookup_value)` returns the area ID for a given device ID, entity ID, or area name. Can also be used as a filter.
|
- `area_id(lookup_value)` returns the area ID for a given device ID, entity ID, or area name. Can also be used as a filter.
|
||||||
- `area_name(lookup_value)` returns the area name for a given device ID, entity ID, or area ID. Can also be used as a filter.
|
- `area_name(lookup_value)` returns the area name for a given device ID, entity ID, or area ID. Can also be used as a filter.
|
||||||
- `area_entities(area_name_or_id)` returns the list of entity IDs tied to a given area ID or name. Can also be used as a filter.
|
- `area_entities(area_name_or_id)` returns the list of entity IDs tied to a given area ID or name. Can also be used as a filter.
|
||||||
@ -378,6 +379,10 @@ The same thing can also be expressed as a test:
|
|||||||
|
|
||||||
{% raw %}
|
{% raw %}
|
||||||
|
|
||||||
|
```text
|
||||||
|
{{ areas() }} # ['area_id']
|
||||||
|
```
|
||||||
|
|
||||||
```text
|
```text
|
||||||
{{ area_id('Living Room') }} # 'deadbeefdeadbeefdeadbeefdeadbeef'
|
{{ area_id('Living Room') }} # 'deadbeefdeadbeefdeadbeefdeadbeef'
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user