Add support for multiple entity_ids in conditions (#13761)

This commit is contained in:
Franck Nijhof 2020-06-15 22:54:32 +02:00 committed by GitHub
parent c9642aab3a
commit c0ada6683a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,6 +112,18 @@ condition:
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
Tests if an entity is a specified state.
@ -128,6 +140,18 @@ condition:
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 state condition
@ -272,6 +296,18 @@ condition:
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
```yaml