mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-15 13:26:54 +00:00
'device_attr' and 'is_device_attr' can be used as a filter and as a test (#25036)
This commit is contained in:
parent
0d0f9f2633
commit
e43b9fae57
@ -271,8 +271,8 @@ The same thing can also be expressed as a test:
|
||||
### Devices
|
||||
|
||||
- `device_entities(device_id)` returns a list of entities that are associated with a given device ID. Can also be used as a filter.
|
||||
- `device_attr(device_or_entity_id, attr_name)` returns the value of `attr_name` for the given device or entity ID. Not supported in [limited templates](#limited-templates).
|
||||
- `is_device_attr(device_or_entity_id, attr_name, attr_value)` returns whether the value of `attr_name` for the given device or entity ID matches `attr_value`. Not supported in [limited templates](#limited-templates).
|
||||
- `device_attr(device_or_entity_id, attr_name)` returns the value of `attr_name` for the given device or entity ID. Can also be used as a filter. Not supported in [limited templates](#limited-templates).
|
||||
- `is_device_attr(device_or_entity_id, attr_name, attr_value)` returns whether the value of `attr_name` for the given device or entity ID matches `attr_value`. Can also be used as a test. Not supported in [limited templates](#limited-templates).
|
||||
- `device_id(entity_id)` returns the device ID for a given entity ID or device name. Can also be used as a filter.
|
||||
|
||||
#### Devices examples
|
||||
|
Loading…
x
Reference in New Issue
Block a user