本帖最后由 comeon_000 于 2020-4-4 00:31 编辑
下面两条自动化的触发条件一样,然后在晚上12点以后触发条件,一直是执行上面的自动化,下面的不会执行
条件判断是失效了吗,尝试了各种办法也看不到期望的结果,大神帮看看是哪里的问题
#解除离家警戒
- alias: 'Trigger disarmed from armed away'
trigger:
- platform: state
entity_id: group.groupfamily
to: 'home'
condition:
- condition: time
after: '07:00:00'
before: '00:00:00'
action:
- service: alarm_control_panel.alarm_disarm
entity_id: alarm_control_panel.home_alarm
data:
code: XXXX
- service: notify.mobile_app_XXXX
data:
message: '已解除离家警戒'
title: '通知'
#在家警戒
- alias: 'Trigger armed home at night'
trigger:
- platform: state
entity_id: group.groupfamily
to: 'home'
condition:
condition: and
conditions:
- condition: time
after: '00:00:00'
before: '07:00:00'
- condition: or
conditions:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: 'armed_away'
- condition: state
entity_id: alarm_control_panel.home_alarm
state: 'disarmed'
- condition: state
entity_id: alarm_control_panel.home_alarm
state: 'pending'
action:
- service: alarm_control_panel.alarm_arm_home
entity_id: alarm_control_panel.home_alarm
data:
code: XXXX
- service: notify.mobile_app_XXXX
data:
message: '已进入在家警戒模式'
title: '通知'
|