Washer and Dryer Automations

If you haven’t watched the video explaining the washer and dryer automations then go check it out here.

This is just the YAML code for each automation incase it was helpful.

Washer Automations

This automation lets my smart home know my washing machine is running.

alias: Washing Machine Powered On
description: ""
mode: single
triggers:
  - entity_id: sensor.kasa_outlet_energy_monitoring_current_consumption
    above: 50
    for:
      hours: 0
      minutes: 0
      seconds: 3
    trigger: numeric_state
conditions:
  - condition: state
    entity_id: input_boolean.washing_machine_on
    state: "off"
actions:
  - data: {}
    entity_id: input_boolean.washing_machine_on
    action: input_boolean.turn_on

The next automation is when my washing machine is finished.

alias: Washing Machine Powered Off
description: ""
triggers:
  - entity_id: sensor.kasa_outlet_energy_monitoring_current_consumption
    for:
      hours: 0
      minutes: 1
      seconds: 0
    below: 8
    trigger: numeric_state
conditions:
  - condition: state
    entity_id: input_boolean.washing_machine_on
    state: "on"
actions:
  - choose:
      - conditions:
          - condition: state
            entity_id: input_boolean.reed_washing_machine
            state: "on"
        sequence:
          - data:
              title: Washing machine done
              message: Move the clothes over
            action: script.android_notification_basic
    default:
      - data:
          title: Washing machine done
          message: Move the clothes over
        action: script.alys_phone_push_notification
  - data: {}
    target:
      entity_id:
        - input_boolean.washing_machine_on
        - input_boolean.reed_washing_machine
    action: input_boolean.turn_off
mode: single

Dryer Automations

There are two automations that could tell my smart home that the dryer is running based on the vibration sensor.

alias: Dryer vibration on for a long time
description: ""
triggers:
  - trigger: state
    entity_id:
      - binary_sensor.third_reality_vibration_sensor_motion
    to: "on"
    for:
      hours: 0
      minutes: 2
      seconds: 0
conditions: []
actions:
  - action: input_boolean.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: input_boolean.dryer_running
mode: single

The second automation if the dryer is having lots of on and off vibrations.

alias: Dryer vibration counter add
description: ""
triggers:
  - trigger: state
    entity_id:
      - binary_sensor.third_reality_vibration_sensor_motion
    to: "on"
conditions: []
actions:
  - action: counter.increment
    metadata: {}
    data: {}
    target:
      entity_id: counter.dryer_vibration_counter
  - condition: numeric_state
    entity_id: counter.dryer_vibration_counter
    above: 30
  - action: input_boolean.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: input_boolean.dryer_running
mode: single

Then the automation that lets me know the dryer has finished running.

alias: Dryer not running anymore
description: ""
triggers:
  - trigger: state
    entity_id:
      - binary_sensor.third_reality_vibration_sensor_motion
    to: "off"
    for:
      hours: 0
      minutes: 3
      seconds: 0
conditions: []
actions:
  - action: counter.reset
    metadata: {}
    data: {}
    target:
      entity_id: counter.dryer_vibration_counter
  - condition: state
    entity_id: input_boolean.dryer_running
    state: "on"
  - choose:
      - conditions:
          - condition: state
            entity_id: input_boolean.reed_dryer
            state: "on"
        sequence:
          - data:
              title: The dryer is finished
              message: Get the clothes out
            action: script.android_notification_basic
    default:
      - data:
          title: The dryer is finished
          message: Get the clothes out
        action: script.alys_phone_push_notification
  - action: input_boolean.turn_off
    metadata: {}
    data: {}
    target:
      entity_id:
        - input_boolean.dryer_running
        - input_boolean.reed_dryer
mode: single