84 lines
2.1 KiB
YAML
84 lines
2.1 KiB
YAML
# Laundry Package
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Washer Final Pump-Out State Machine
|
|
input_select:
|
|
washer_final_pump_state:
|
|
name: Washer Final Pump State
|
|
options:
|
|
- Idle
|
|
- Check
|
|
- Triggered
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Laundry Automations
|
|
automation:
|
|
- alias: Notify when Dryer Done
|
|
mode: single
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id: sensor.dryer_power_electric_consumption_a
|
|
below: 1.0
|
|
for:
|
|
minutes: 1
|
|
action:
|
|
- service: notify.everyone
|
|
data:
|
|
message: Dryer is done
|
|
|
|
- alias: Washer Final Pump-Out - Check
|
|
mode: single
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.washer_power_electric_consumption_a
|
|
above: 0.5
|
|
condition:
|
|
- "{{ is_state('input_select.washer_final_pump_state', 'Idle') }}"
|
|
action:
|
|
- service: input_select.select_option
|
|
target:
|
|
entity_id: input_select.washer_final_pump_state
|
|
data:
|
|
option: Check
|
|
|
|
- alias: Washer Final Pump-Out - Trigger
|
|
mode: single
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.washer_power_electric_consumption_a
|
|
below: 0.5
|
|
condition:
|
|
- "{{ is_state('input_select.washer_final_pump_state', 'Check') }}"
|
|
action:
|
|
- service: input_select.select_option
|
|
target:
|
|
entity_id: input_select.washer_final_pump_state
|
|
data:
|
|
option: Triggered
|
|
|
|
- alias: Washer Final Pump-Out - Reset
|
|
mode: single
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_select.washer_final_pump_state
|
|
from: Idle
|
|
for:
|
|
seconds: 30
|
|
action:
|
|
- service: input_select.select_option
|
|
target:
|
|
entity_id: input_select.washer_final_pump_state
|
|
data:
|
|
option: Idle
|
|
|
|
- alias: Notify when Washer Done
|
|
mode: single
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_select.washer_final_pump_state
|
|
to: Triggered
|
|
action:
|
|
- service: notify.everyone
|
|
data:
|
|
message: Washer is done
|