Document config_enty_attr (#33374)

This commit is contained in:
Paulus Schoutsen 2024-06-23 05:02:57 -04:00 committed by GitHub
parent 12ce7b4785
commit ad744eb7d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -447,6 +447,7 @@ The same thing can also be expressed as a test:
### Config entries
- `config_entry_id(entity_id)` returns the config entry ID for a given entity ID. Can also be used as a filter.
- `config_entry_attr(attr)` returns the value of `attr` for the config entry of the given entity ID. Can also be used as a filter. The following attributes are allowed: `domain`, `title`, `state`, `source`, `disabled_by`. Not supported in [limited templates](#limited-templates).
#### Config entries examples
@ -456,6 +457,12 @@ The same thing can also be expressed as a test:
{{ config_entry_id('sensor.sony') }} # deadbeefdeadbeefdeadbeefdeadbeef
```
```text
{{ config_entry_attr(config_entry_id('sensor.sony'), 'title') }} # Sony Bravia TV
```
{% endraw %}
### Floors