mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-17 06:16:50 +00:00
Add support for multiple entity_ids in conditions (#13761)
This commit is contained in:
parent
c9642aab3a
commit
c0ada6683a
@ -112,6 +112,18 @@ condition:
|
|||||||
value_template: {% raw %}'{{ float(state.state) + 2 }}'{% endraw %}
|
value_template: {% raw %}'{{ float(state.state) + 2 }}'{% endraw %}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
It is also possible to test the condition against multiple entities at once.
|
||||||
|
The condition will pass if all entities match the thresholds.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
condition:
|
||||||
|
condition: numeric_state
|
||||||
|
entity_id:
|
||||||
|
- sensor.kitchen_temperature
|
||||||
|
- sensor.living_room_temperature
|
||||||
|
below: 18
|
||||||
|
```
|
||||||
|
|
||||||
### State condition
|
### State condition
|
||||||
|
|
||||||
Tests if an entity is a specified state.
|
Tests if an entity is a specified state.
|
||||||
@ -128,6 +140,18 @@ condition:
|
|||||||
seconds: 5
|
seconds: 5
|
||||||
```
|
```
|
||||||
|
|
||||||
|
It is also possible to test the condition against multiple entities at once.
|
||||||
|
The condition will pass if all entities match the state.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
condition:
|
||||||
|
condition: state
|
||||||
|
entity_id:
|
||||||
|
- light.kitchen
|
||||||
|
- light.living_room
|
||||||
|
state: 'on'
|
||||||
|
```
|
||||||
|
|
||||||
### Sun condition
|
### Sun condition
|
||||||
|
|
||||||
#### Sun state condition
|
#### Sun state condition
|
||||||
@ -272,6 +296,18 @@ condition:
|
|||||||
zone: zone.home
|
zone: zone.home
|
||||||
```
|
```
|
||||||
|
|
||||||
|
It is also possible to test the condition against multiple entities at once.
|
||||||
|
The condition will pass if all entities are in the specified zone.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
condition:
|
||||||
|
condition: zone
|
||||||
|
entity_id:
|
||||||
|
- device_tracker.frenck
|
||||||
|
- device_tracker.daphne
|
||||||
|
zone: zone.home
|
||||||
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
Loading…
x
Reference in New Issue
Block a user