J大可以详细说吗? 我的疑问在于
trigger - describle events that should trigger the automation rule
condition - optional test that can limit an automation rule to ....(来自HA的doc)
也就是说, trigger 是真正激发规则的因素
---
您说哪个在后就把哪个作为trigger (是否理解为, 这样保证两个条件 trigger_condition & condition_condition)都是true? 我的疑问(进门模式):
---|初始|进门|关门|离开门|
门窗sen off |on |off | off |
运动sen off |off |off |on |
进门时候, 门窗sensor先(因此作为condition)
下方yaml
在trigger被激发的时候,binary_sensor.motion_sensor_158d00022320dc (from off to on)
这时候(**关门->离开**)这个时刻, 这时候门窗(我们选中的condition)实际上是off, 下方脚本
```
condition:
condition: state
entity_id: binary_sensor.door_window_sensor_158d0002027753
state: 'on'
```
是不满足的啊, 怎么就能成功呢?