mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 07:17:14 +00:00
Add alias as accepted lookup value for area_id and floor_id templates
This commit is contained in:
parent
6ed4d8692a
commit
734fe8e8f6
@ -466,7 +466,7 @@ The same thing can also be expressed as a test:
|
|||||||
### Floors
|
### Floors
|
||||||
|
|
||||||
- `floors()` returns the full list of floor IDs.
|
- `floors()` returns the full list of floor IDs.
|
||||||
- `floor_id(lookup_value)` returns the floor ID for a given device ID, entity ID, area ID, or area name. Can also be used as a filter.
|
- `floor_id(lookup_value)` returns the floor ID for a given floor name or alias, device ID, entity ID, area ID, or area name or alias. Can also be used as a filter.
|
||||||
- `floor_name(lookup_value)` returns the floor name for a given device ID, entity ID, area ID, or floor ID. Can also be used as a filter.
|
- `floor_name(lookup_value)` returns the floor name for a given device ID, entity ID, area ID, or floor ID. Can also be used as a filter.
|
||||||
- `floor_areas(floor_name_or_id)` returns the list of area IDs tied to a given floor ID or name. Can also be used as a filter.
|
- `floor_areas(floor_name_or_id)` returns the list of area IDs tied to a given floor ID or name. Can also be used as a filter.
|
||||||
|
|
||||||
@ -482,6 +482,10 @@ The same thing can also be expressed as a test:
|
|||||||
{{ floor_id('First floor') }} # 'first_floor'
|
{{ floor_id('First floor') }} # 'first_floor'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```text
|
||||||
|
{{ floor_id('First floor alias') }} # 'first_floor'
|
||||||
|
```
|
||||||
|
|
||||||
```text
|
```text
|
||||||
{{ floor_id('my_device_id') }} # 'second_floor'
|
{{ floor_id('my_device_id') }} # 'second_floor'
|
||||||
```
|
```
|
||||||
@ -511,7 +515,7 @@ The same thing can also be expressed as a test:
|
|||||||
### Areas
|
### Areas
|
||||||
|
|
||||||
- `areas()` returns the full list of area IDs
|
- `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 or alias. 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.
|
||||||
- `area_devices(area_name_or_id)` returns the list of device IDs tied to a given area ID or name. Can also be used as a filter.
|
- `area_devices(area_name_or_id)` returns the list of device IDs tied to a given area ID or name. Can also be used as a filter.
|
||||||
@ -528,6 +532,10 @@ The same thing can also be expressed as a test:
|
|||||||
{{ area_id('Living Room') }} # 'deadbeefdeadbeefdeadbeefdeadbeef'
|
{{ area_id('Living Room') }} # 'deadbeefdeadbeefdeadbeefdeadbeef'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```text
|
||||||
|
{{ area_id('Living Room Alias') }} # 'deadbeefdeadbeefdeadbeefdeadbeef'
|
||||||
|
```
|
||||||
|
|
||||||
```text
|
```text
|
||||||
{{ area_id('my_device_id') }} # 'deadbeefdeadbeefdeadbeefdeadbeef'
|
{{ area_id('my_device_id') }} # 'deadbeefdeadbeefdeadbeefdeadbeef'
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user