Washing machine power consumption trigger

Just want to add my version with only 2 states: Washing and Ready.
And based on the Watt power usage.
I used below 10W (for a duration of 2 min.) for Ready and above 100W (for 10 sec. as it normally starts with heating directly) for Washing, which I guess works for any normal washing machine.
Based on the info in this thread and the example in the input select page.

Configuration.yaml:

input_select:
  state_washingmachine:
    name: Washing Machine state
    options:
      - Ready
      - Washing
    icon: mdi:tumble-dryer

In automation.yaml or after automation: in configuration.yaml


- id: washingmachine_washing
  alias: 'Washing Machine - washing state'
  trigger:
   - above: 100
     entity_id: sensor.wasmachine_power
     for: 00:00:10
     platform: numeric_state
  action:
    - service: input_select.select_option
      data:
        entity_id: input_select.state_washingmachine
        option: 'Washing'

- id: washingmachine_ready
  alias: 'Washing Machine - ready state'
  trigger:
   - below: 10
     entity_id: sensor.wasmachine_power
     for: 00:02:00
     platform: numeric_state
  action:
    - service: input_select.select_option
      data:
        entity_id: input_select.state_washingmachine
        option: 'Ready'

I furthermore added the automation to blink the living room (woonkamer) and Diner table (keuken tafel) when done.

- id: washing_machine_ready
  alias: Washing machine ready
  trigger:
    platform: state
    entity_id: input_select.state_washingmachine
    from: "Washing"
    to: "Ready"
  action:
  - service: light.toggle
    entity_id:
        - light.woonkamer_plafond_lamp
        - light.eettafel_lamp
  - delay: 00:00:01
  - service: light.toggle
    entity_id:
        - light.woonkamer_plafond_lamp
        - light.eettafel_lamp
  - delay: 00:00:01
  - service: light.toggle
    entity_id:
        - light.woonkamer_plafond_lamp
        - light.eettafel_lamp
  - delay: 00:00:01
  - service: light.toggle
    entity_id:
        - light.woonkamer_plafond_lamp
        - light.eettafel_lamp
10 Likes