List all areas with templating (#26303)

This commit is contained in:
Lucas Mindêllo de Andrade 2023-03-09 18:32:43 -03:00 committed by GitHub
parent 3bc5a2b96d
commit 9026d0ad20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -369,6 +369,7 @@ The same thing can also be expressed as a test:
### 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_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.
@ -378,6 +379,10 @@ The same thing can also be expressed as a test:
{% raw %}
```text
{{ areas() }} # ['area_id']
```
```text
{{ area_id('Living Room') }} # 'deadbeefdeadbeefdeadbeefdeadbeef'
```