Dishwasher Automation - Energy Monitoring Smart Plug etc

Ok guys, i need some tips, or possibly some advice on how to achive the following.

I notice alot of people are using Energy monitoring smart to let you know when things like dishwasher, washing machine etc have finished. Which is great, and something else i will be adding to my HA.

However, my dishwasher is abit of a dinosaur (i will be replacing it in the near future for an energy efficient one, however i cant afford to right now, as ive just moved in, and replaced the washing machine etc already)

In short, what i want to try and to is the following:

  1. Detect if the DIshwasher has been turned on (using the energy monitoring from a plug)
  2. If the dishwasher has been turned on in between the hours of 5:30am and 11:30pm, i want the smart plug to turn off, and turn back on at 11:40pm.
  3. Notify once it starts and its stoped (during peak times)
  4. Notify once it re-starts at 11:40pm
  5. Notify once finished? (this may be the tricky one due to the stop and starts etc.

I have already turned the dishwasher on, and then turn it of the wall for 30 mins, and turned it back, and the dishwsher continues the current cycle (which is great as this means using the plug to turn it on and off will work for this purpose)

I use Home Assistant, and i also use NodeRed, im fairly confident i can do this, but im wondering if someone may have already done it that could share the automation, or flow or generally just give me some ideas!

Many thanks

Rob

You might get some inspiration or help from my configuration:

This is one of many on YouTube Integrating a Dumb Washing Machine with Home Assistant - YouTube

Thanks for this, this is really helpful - ill work through some of the code to see if i can change it to do what i need :slight_smile:

I actually struggled to find anything on youtube if im honest, plenty of alerts to show you its finished, but nothing to stop, and restart or turn back on when the electric tarriff goes off peak

The difficult part here is to know in which moment the energy is cheaper. You can do it, but it depends on the company that you have, the country, etc… Then you need to create some sensors with the pricing list and the cheap hours and just turn the power on just in this period of time. If you can reach this, the rest is easy, and it depends on the dishwasher, if it needs to be pressed each time that you plug it in (Electronic pushbutton), then you will need to buy a remote external manual switch that can do that, if you are lucky and the dishwasher has a mechanical button that can be left pressed, and the dishwasher starts directly when you power it on, then it will work directly.

The time for me is easy to set. (Im on Octopus Intelligent) so the cheap rate is 11:30pm to 5:30am - so i was thinking of setting it to come back on at 11:40pm purely to give it 10 mins incase someone switches it on at say 11:28pm.

So we can avoid all the pricing lists etc - and hopefully just configure it to detect when its turn on between peak, if it doesn’t, switch the plug off, and then turn the plug back on at 11:40pm. This would work perfect fro what i need, its just trying to write that.

So energy price time - tick - thats easy (just needs to turn on at 11:30pm)

THe dishwasher is manual button - so tick - if i turn it off ont he wall, leave it a few hours, then turn it back, it just carried on with the cycle :slight_smile: (its an old dishwasher lol)

So the difficult side i appear to have sorted - now its just bringing it all together. (im also based in the UK)

Here is an automation I use to monitor a dryer. A smart plug is used to detect on (>8W) and off (<4W), which then toggles a helper for visibility and also fires a voice announcement.

alias: Dryer Monitor
description: ''
trigger:
  - type: power
    platform: device
    device_id: 4863e15a2493cc767bbaafd2cc4b80b1
    entity_id: sensor.dryer_electric_consumed_w_3
    domain: sensor
    below: 4
    id: finished
  - type: power
    platform: device
    device_id: 4863e15a2493cc767bbaafd2cc4b80b1
    entity_id: sensor.dryer_electric_consumed_w_3
    domain: sensor
    above: 8
    id: running
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id: running
        sequence:
          - service: input_boolean.turn_on
            target:
              entity_id: input_boolean.dryeractive
      - conditions:
          - condition: trigger
            id: finished
        sequence:
          - service: input_boolean.turn_off
            target:
              entity_id: input_boolean.dryeractive
          - service: script.dryer_tts
    default: []
mode: single

Hope it helps.

Does not 100% fit your use case but wanted to show you how I implemented a state machine focused approach to classifying the general state an appliance is on. Your automation can easily be build on top of that.


input_select:
  waschmaschine_opstate:
    name: Waschmaschine OpState
    icon: mdi:washing-machine
    options:
      - "Off"
      - "Standby"
      - "Active"
      - "Finished"
    initial: "Off"

automation:
  - id: "1609362853001"
    alias: Regel Waschmaschine verbraucht ganz wenig (Off)
    trigger:
      - platform: numeric_state
        entity_id: sensor.waschmaschine_schaltmessmodul_power
        below: 0.1
        for: "00:03:00"
    condition:
      condition: not
      conditions:
        - condition: state
          entity_id: input_select.waschmaschine_opstate
          state: "Off"
    action:
      - service: input_select.select_option
        data:
          entity_id: input_select.waschmaschine_opstate
          option: "Off"

  - id: "1609362853002"
    alias: Regel Waschmaschine verbraucht 4.3W (Standby)
    trigger:
      - platform: numeric_state
        entity_id: sensor.waschmaschine_schaltmessmodul_power
        above: 4.0
        below: 7.0
        for: "00:01:00"
    condition:
      condition: state
      entity_id: input_select.waschmaschine_opstate
      state: "Off"
    action:
      - service: input_select.select_option
        data:
          entity_id: input_select.waschmaschine_opstate
          option: "Standby"

  - id: "1609362853003"
    alias: Regel Waschmaschine verbraucht 4.3W (Finished)
    trigger:
      - platform: numeric_state
        entity_id: sensor.waschmaschine_schaltmessmodul_power
        above: 4.0
        below: 7.0
        for: "00:01:00"
    condition:
      condition: state
      entity_id: input_select.waschmaschine_opstate
      state: "Active"
    action:
      - service: input_select.select_option
        data:
          entity_id: input_select.waschmaschine_opstate
          option: "Finished"

  - id: "1609362853004"
    alias: Regel Waschmaschine verbraucht >5W (Active)
    trigger:
      - platform: numeric_state
        entity_id: sensor.waschmaschine_schaltmessmodul_power
        above: 7.0
        for: "00:01:00"
    condition:
      condition: not
      conditions:
        - condition: state
          entity_id: input_select.waschmaschine_opstate
          state: "Active"
    action:
      - service: input_select.select_option
        data:
          entity_id: input_select.waschmaschine_opstate
          option: "Active"

Reactive automations:

automation:
  - id: "1609362853006"
    alias: Regel Waschmaschine fertig Benachrichtigung
    trigger:
      - platform: state
        entity_id: input_select.waschmaschine_opstate
        from: "Active"
        to: "Finished"
      - platform: state
        entity_id: input_select.waschmaschine_opstate
        from: "Active"
        to: "Off"
    action:
      - service: notify.all_devices
        data:
          message: "Die Waschmaschine ist fertig"
          data:
            tag: waschmaschine

  - id: "1609362853007"
    alias: Regel Waschmaschine fertig Benachrichtigung beim Heim kommen
    trigger:
      - platform: state
        entity_id: input_boolean.stephan_zuhause
        to: "on"
    condition:
      - condition: state
        entity_id: input_select.waschmaschine_opstate
        state: "Finished"
    action:
      - service: notify.mobile_app_pro_phone
        data:
          message: "Hallo, die Waschmaschine ist fertig"
          data:
            tag: waschmaschine

  - id: "1609362853008"
    alias: Regel Waschmaschine fertig Benachrichtigung löschen
    trigger:
      - platform: state
        entity_id: input_select.waschmaschine_opstate
        to: "Off"
    action:
      service: notify.mobile_app_pro_phone
      data:
        message: clear_notification
        data:
          tag: waschmaschine

3 Likes

cheers - ill add this into the mix

Cheers

This looks mostly there to be fair - ill have a tweak and see what i can make it do.

1 Like