How to do this in one automation? Can I?

I want to notify when my washing machine is completed, I have monitored it and see that when it runs it spikes power consumption over 200watts, then drops to 0.

How can I (hopefully in one automation) know when both has occurred, and every x mins respond till I reset things?

What have you tried to do so far?

post the properly formatted code and we can help you figure out why it won’t work.

you’ll have to detect ’ on’ with a helper boolean. then when power drops to zero and boolean is true, you know the right scenario. doable i would say

Not even sure where to start. So far the only thing I’ve been able to think of is 3 automations

  1. trigger when > 200watts has been reached, set a var
  2. trigger when it goes below 10 watts and first var is true
  3. trigger every 10 mins, but only announce when second var is true

This results in 3 automations and 2 variables. A bit much honestly to maintain, really looking for something in one automation if possible

Second finity’s request for you to take a crack at it and post your attempt, but here is a starting point.

Alerting is built in, so you can cross that automation off:

Then, you just need an automation with a trigger at 200watts and a wait_for_trigger at 10watts.

you dont want this in one automation, as if it would, your autoamtion would run until washing is done, thats not good practice. (eg you restart HA and your automation stops).
Make helper boolean instead of var and you’ll have to automations to do

I’m not sure this is critical enough to worry about that, especially if the OP is not one to be messing with HA too often. However, if it is, then a slight adjustment to my recommendation: scrap the wait_for_trigger, and go with a helper, as recommended above. However, with trigger IDs and an input_select, instead of a boolean, you can still achieve this with one automation and a choose to define two paths.

I don’t mess with it too often, but when I do it could be a few days of rebooting every 10-30 mins, so the wait_for_trigger wouldn’t work for me.

Thank you for pointing me choose, I’ve not used this before and looks interesting, will see how it works out, but may still fall back to the 3 automations for now just to get this working.

1 Like

You might be interested in how I used the measurements from a power-monitoring plug to identify each phase of a complete washing cycle. The challenge is that, in my case, power level can’t be used to differentiate between the end of the wash phase and the end of the rinse phase (which represents the end of the complete cycle) because the power consumption is nearly identical. The solution is to step through the options of an input_select where each option represents a distinct phase of the cycle. When it reaches the last option, it has truly completed the entire wash cycle.

It may be more complex than what you need but it may serve to shed light on your current or future requirements. Jump to the Washer Monitor section of the following post (the first section is a simplified version for the topic’s author):

The project is described in two posts; here’s the second one:


NOTE

I suggest you solve the challenge using however many automations/scripts/entities needed. Once you have it working, you may wish to review it and determine if it can be simplified/consolidated. Sometimes there’s no added value to consolidate it. In this case, I have one automation for stepping through the individual phases and a separate one for alerting me when the wash cycle is finished. Plus there’s a Template Sensor and an input_select.

This is what I did tonight, I’ve been sick (damn cold) and as such don’t have brain power to over engineer it, here’s what I did:

  1. Washer - On
    Trigger: Consumption over 200 Watts
    Action: turns on Washer - Done

  2. Washer - Done
    Trigger - less then 10 watts for 5 mins (may adjust the time after we test it all out)
    Action - Turn on Washer - Notify, turn off Washer - Done

  3. Washer - Notify
    Trigger - /5 minutes (starting point, may go to 10)
    Condition - Wife is home after 10am and before 10pm
    Action - Announce over multiple Alexa’s “Washer is Done”

Now to get SmartDry integrated with HA, and do something similar for the Dryer, but should be one less automation due to SmartDry have a on/of state

Thank you everyone for your suggestions, setting this up tonight was that difficult, and depending on how much I have to tweak it I may leave it, either way I have seen some things I’ve not used in the past and can look at those for future projects.