mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-15 13:26:54 +00:00
use correct attribute for valve position (#16118)
"valve" reflects the VALVE_STATE, e.g. "ADAPTION_DONE" etc.
This commit is contained in:
parent
42e30c7360
commit
79a13f6d45
@ -203,14 +203,14 @@ This does *not* affect the entities in Home Assistant. They all use their own co
|
||||
|
||||
### Reading attributes of entities
|
||||
|
||||
Most devices have, besides their state, additional attributes like their battery state or valve position. These can be accessed using templates in automations, or even as their own entities using the [template sensor](/integrations/template) component. Here's an example of a template sensor that exposes the valve state of a thermostat.
|
||||
Most devices have, besides their state, additional attributes like their battery state or valve position. These can be accessed using templates in automations, or even as their own entities using the [template sensor](/integrations/template) component. Here's an example of a template sensor that exposes the valve position of a thermostat.
|
||||
|
||||
```yaml
|
||||
sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
bedroom_valve:
|
||||
value_template: "{% raw %}{{ state_attr('climate.leq123456', 'valve') }}{% endraw %}"
|
||||
value_template: "{% raw %}{{ state_attr('climate.leq123456', 'level') }}{% endraw %}"
|
||||
entity_id: climate.leq123456
|
||||
friendly_name: 'Bedroom valve'
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user