mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-22 16:56:50 +00:00
Translated condition example to english (#17748)
Wasn't sure I was understanding the condition example correctly, so I translated it to english for clarity.
This commit is contained in:
parent
15b6d4ba53
commit
87eaa28be8
@ -13,10 +13,10 @@ Example of using condition:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
automation:
|
automation:
|
||||||
- alias: "Enciende Despacho"
|
- alias: "Turn on office lights"
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: sensor.mini_despacho
|
entity_id: sensor.office_motion_sensor
|
||||||
to: "on"
|
to: "on"
|
||||||
condition:
|
condition:
|
||||||
- condition: or
|
- condition: or
|
||||||
@ -26,12 +26,12 @@ automation:
|
|||||||
attribute: elevation
|
attribute: elevation
|
||||||
below: 4
|
below: 4
|
||||||
- condition: numeric_state
|
- condition: numeric_state
|
||||||
entity_id: sensor.sensorluz_7_0
|
entity_id: sensor.office_lux_sensor
|
||||||
below: 10
|
below: 10
|
||||||
action:
|
action:
|
||||||
- service: scene.turn_on
|
- service: scene.turn_on
|
||||||
target:
|
target:
|
||||||
entity_id: scene.DespiertaDespacho
|
entity_id: scene.office_lights
|
||||||
```
|
```
|
||||||
|
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
@ -42,16 +42,16 @@ The `condition` option of an automation, also accepts a single condition templat
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
automation:
|
automation:
|
||||||
- alias: "Enciende Despacho"
|
- alias: "Turn on office lights"
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: sensor.mini_despacho
|
entity_id: sensor.office_motion_sensor
|
||||||
to: "on"
|
to: "on"
|
||||||
condition: "{{ state_attr('sun.sun', 'elevation') < 4 }}"
|
condition: "{{ state_attr('sun.sun', 'elevation') < 4 }}"
|
||||||
action:
|
action:
|
||||||
- service: scene.turn_on
|
- service: scene.turn_on
|
||||||
target:
|
target:
|
||||||
entity_id: scene.DespiertaDespacho
|
entity_id: scene.office_lights
|
||||||
```
|
```
|
||||||
|
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user