Hello,
Is the input_boolean the cleanest/most concise way to do this, or is there a way to abort the loop on the event trigger from inside the loop?
automation:
- id: "notify_washer_dryer"
trigger:
- platform: state
entity_id: sensor.washer
attribute: run_completed
to: "on"
id: wash
- platform: state
entity_id: sensor.dryer
attribute: run_completed
to: "on"
id: dry
action:
- choose:
- conditions:
- condition: trigger
id: wash
sequence:
- service: script.wash_notify
- wait_for_trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: wash_empty
- service: input_boolean.turn_off
target:
entity_id: input_bolean.wash_done
- conditions:
- condition: trigger
id: dry
sequence:
- service: script.dry_notify
- wait_for_trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: dry_empty
- service: input_boolean.turn_off
target:
entity_id: input_bolean.dry_done
mode: single
script:
wash_notify:
sequence:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.wash_done
- alias: "Push notification every 20 min while boolean is on"
repeat:
while:
- condition: state
entity_id: input_boolean.wash_done
state: "on"
sequence:
- service: notify.mobile_app
data:
message: The wash cycle is complete
title: Washing Machine
data:
actions:
- action: wash_empty
title: Empty?
- delay: 00:20:00
mode: single
dry_notify:
sequence:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.dry_done
- alias: "Push notification every 20 min while boolean is on"
repeat:
while:
- condition: state
entity_id: input_boolean.dry_done
state: "on"
sequence:
- service: notify.mobile_app
data:
message: The dry cycle is complete
title: Dryer
data:
actions:
- action: dry_empty
title: Empty?
- delay: 00:20:00
mode: single
Thanks!
Phil