alias: frootdoor_report_not_locked_for_x_mintes
trigger:
- platform: state
entity_id: binary_sensor.ble_opening_frontdoor
to: 'off'
for:
minutes: 1
condition:
- condition: state
entity_id: binary_sensor.lock_lift_handle_opening
to: 'off'
action:
- service: notify.mobile_app_bertybassett_iphone15_pro_max
data:
message: You forget to lift the frontdoor handle - Door not locked
id: be3849f61b5441b091c0b74b0f9f6875
if youâre saying the state of binary_sensor.lock_lift_handle_opening must be off, then you need to do this:
alias: frootdoor_report_not_locked_for_x_mintes
trigger:
- platform: state
entity_id: binary_sensor.ble_opening_frontdoor
to: 'off'
for:
minutes: 1
condition:
- condition: state
entity_id: binary_sensor.lock_lift_handle_opening
state: 'off'
action:
- service: notify.mobile_app_bertybassett_iphone15_pro_max
data:
message: You forget to lift the frontdoor handle - Door not locked
id: be3849f61b5441b091c0b74b0f9f6875
note that the indents on your original posted yaml is messed up and wonât work. i presume that was a copy error since you said it works if you nuke the condition?
i didnât fix your indents⌠make sure youâve got that fixed in your acual running code⌠just changed the one line in your condition block.
if youâre trying to run the actions when that sensor changes to âoffâ then it shouldnât be in the condition block, it should be in the trigger block.
Indenting is still wrong. trigger, condition action and id must have same level as alias, there may be more indenting errors, but they are hard to spot when if starts off wrong.
Try building it in the ui and learn from that when writing them manually. You can also test conditions there and examine traces.
- alias: frootdoor_report_not_locked_for_x_mintes
trigger:
- platform: state
entity_id: binary_sensor.ble_opening_frontdoor
to: 'off'
for:
minutes: 1
action:
- service: notify.mobile_app_bertybassett_iphone15_pro_max
data:
message: You forget to lift the frontdoor handle - Door not locked
Are we saying this has indent error (despite it triggering)
- alias: frootdoor_report_not_locked_for_x_mintes
trigger:
- platform: state
entity_id: binary_sensor.ble_opening_frontdoor
to: 'off'
for:
minutes: 1
condition:
- condition: state
entity_id: binary_sensor.lock_lift_handle_opening
state: 'off'
action:
- service: notify.mobile_app_bertybassett_iphone15_pro_max
data:
message: You forget to lift the frontdoor handle - Door not locked
alias: frootdoor_report_not_locked_for_x_mintes
id: be3849f61b5441b091c0b74b0f9f6875
trigger:
- platform: state
entity_id: binary_sensor.ble_opening_frontdoor
to: 'off'
for:
minutes: 1
condition:
- condition: state
entity_id: binary_sensor.lock_lift_handle_opening
to: 'off'
action:
- service: notify.mobile_app_bertybassett_iphone15_pro_max
data:
message: You forget to lift the frontdoor handle - Door not locked