Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dishwasher monitoring #181

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
108 changes: 108 additions & 0 deletions packages/dishwasher.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# https://philhawthorne.com/making-dumb-dishwashers-and-washing-machines-smart-alerts-when-the-dishes-and-clothes-are-cleaned/
# Dishwasher is in drying phase when power consumption is 2.1KW for up to 18 minutes
# When idle after a job, the dishwasher uses 57W for 5 minutes
input_select:
dishwasher_status:
name: Dishwasher Status
options:
- 'Off'
- 'Standby'
- 'Draining'
- 'Washing'
initial: 'Off'

automation:
- alias: Set dishwasher active when power detected
trigger:
- platform: numeric_state
entity_id: sensor.dishwasher_power_plug_power
above: 10
condition:
condition: or
conditions:
- condition: state
entity_id: input_select.dishwasher_status
state: Dirty
- condition: state
entity_id: input_select.dishwasher_status
state: Clean
- condition: state
entity_id: input_select.dishwasher_status
state: Drying
action:
- service: input_select.select_option
data:
entity_id: input_select.dishwasher_status
option: Running

# When the power level drops below 10, and the Dishwasher is set to
# the 'Running' state, mark the Dishwasher as Finished

- alias: Set dishwasher drying when power drops
trigger:
- platform: numeric_state
entity_id: sensor.dishwasher_power_plug_power
below: 10
condition:
condition: and
conditions:
- condition: state
entity_id: input_select.dishwasher_status
state: Running
action:
- service: input_select.select_option
data:
entity_id: input_select.dishwasher_status
option: Drying

# Once the dishwasher status has been 'Drying' for 15 minutes, mark the
# dishwasher as clean

- alias: Set dishwasher clean
trigger:
- platform: state
entity_id: input_select.dishwasher_status
to: Drying
for:
minutes: 15
condition:
condition: and
conditions:
- condition: state
entity_id: input_select.dishwasher_status
state: Drying
action:
- service: input_select.select_option
data:
entity_id: input_select.dishwasher_status
option: Clean

# When the power drops and the dishwasher is Clean or Drying, someone has
# turned the Dishwasher off and emptied it. We should do this when the state
# of the Dishwasher is clean or Finishing, just incase someone opens the
# Dishwasher before the 30 minute timeout has been reached.

- alias: Set Dishwasher dirty when power off
trigger:
- platform: numeric_state
entity_id: sensor.dishwasher_power_plug_power
below: 3
condition:
condition: and
conditions:
- condition: numeric_state
entity_id: sensor.dishwasher_power_plug_power
below: 1
- condition: or
conditions:
- condition: state
entity_id: input_select.dishwasher_status
state: Clean
- condition: state
entity_id: input_select.dishwasher_status
state: Drying
action:
- service: input_select.select_option
data:
entity_id: input_select.dishwasher_status
option: Dirty