Notify or do something when an appliance like a dishwasher or washing machine finishes

Hi @Sbyx

first of all, many thanks for that nice blueprint which (almost) fit my needs.
However, would it be possible to make those wattage selections more granular, means 0.5 steps instead of 1.0?

Background of this requirement is that I’d like to switch off a device (Sat-IP Server namely) after it has been in idle mode for a while.
Therefore I have to define the power threshold to something like below 14.5W, but above 14.0.

Many thanks!

Just type what you want into the box to the right of the slider or click on the 3 dots and go edit in YAML and type in the value you want at the right spot.

This fixed it! Thank you!

I am also getting this error now and have not changed anything.

WAF dropped to 0

1 Like

The blueprint doesn’t import in 2022.05 and 2022.05.01 because of a bug:

The workaround is to place the file from the gist manually in the config/blueprint folder.

There will be a fix in 2022.05.02: Stringify enums in selectors by balloob · Pull Request #71441 · home-assistant/core · GitHub

I am not seeing “the forest for the trees”
I have set the power sensor menu item.
I left all the starting and finishing items as shown because that shuld work for me.
I then created an action to notify me.
The following is the yaml produced.
I do not see where any trigger info comes in to play.
What have I missed.

- id: '1651783438816'
  alias: Appliance has finished
  description: ''
  use_blueprint:
    path: sbyx/notify-or-do-something-when-an-appliance-like-a-dishwasher-or-washing-machine-finishes.yaml
    input:
      power_sensor: sensor.dishwasher_watts
      actions:
      - service: notify.brooks5123
        data:
          message: dw done
          title: dw done
      pre_actions:
      - delay: '0'

Thanks

Carlton, you write, if I understand correctly, that you left the starting and finishing thresholds to the defaults, and that’s why they’re not showing up in the generated yaml. If you’d changed them, they would show up as starting_hysteresis, starting_threshold, finishing_hysteresis, finishing_threshold, a bit like this:

- id: '1651783438816'
  alias: Appliance has finished
  description: ''
  use_blueprint:
    path: sbyx/notify-or-do-something-when-an-appliance-like-a-dishwasher-or-washing-machine-finishes.yaml
    input:
      starting_hysteresis: 1
      finishing_hysteresis: 1
      starting_threshold: 6
      finishing_threshold: 6
      power_sensor: sensor.dishwasher_watts
      actions:
      - service: notify.brooks5123
        data:
          message: dw done
          title: dw done
      pre_actions:
      - delay: '0'

The rest of the fun happens in code that is in the blueprint - you can click on the gist to read it and see how it works.

Thank you for the information.
I thought that I would try it with the defaults listed but now I know they need to be changed.
Will try it and see what happens.
Thanks

@Sbyx: I was wondering if you would add those triggers:

- platform: event
  event_type: automation_reloaded
- platform: homeassistant
  event: start

I think that would easily and finally make automations based on this blueprint work if
a) automations have been reloaded
b) HA has been restarted

Both cases/events rendered my automations based on this blueprint useless during the last years, cause they “forgot” their starting_threshold and starting_hysterisis have been crossed already (the automation has been triggered already and is/was running). In short: currently this blueprint is not able to survive reloading automations. Possibly those additional triggers will fix this (and make my additional “failsafe automation” useless).

I primarily use this blueprint to make my working desk power plug been switched off automatically after system has been shutdown/hibernated/removed.

(see my report from March and April 2021… Notify or do something when an appliance like a dishwasher or washing machine finishes - #54 by e-raser + Notify or do something when an appliance like a dishwasher or washing machine finishes - #55 by e-raser)


UPDATE after 7 days of testing:
3 minor modifications and this blueprint finally works perfectly. See Notify or do something when an appliance like a dishwasher or washing machine finishes - #133 by e-raser for details.

1 Like

@e-raser I think I might have the solution! You could give my blueprint a try!

Thank you. While I basically don’t like the approach of “outsourced configuration data” (by using helper entities as config parameters instead of handling all inside the blueprint/automation which is much more tidy and centralized) I will have a look at your blueprint. It looks like a very very VERY powerful one. Interesting is the external “only Italian” HA Power Control part :smiley: I don’t even get what it does, will probably head over to Google Translate to do the IT/EN or IT/DE job :wink:

I’m really quite happy with @Sbyx ones blueprint here, actually it works perfect… as soon as the bug/optimization noted here has been fixed/implemented :slight_smile: :+1:

1 Like

@e-raser Well, I am working on a translation myself :shushing_face:
I’d then ask HA Power Control’s author to approve that. I’m like 90% done, but that’s still unfinished.

I answered a question about that specifically, it should explain what it does:

@e-raser

Honestly, even if I do like this blueprint, the problem that you mention, that “currently this blueprint is not able to survive reloading automations” is a big deal to me.

I actually doubt that adding the automation_reloaded and the start triggers would make a big difference. What they’d do instead is execute the pre_actions (Actions when starting threshold is crossed) and nothing more. Therefore, unless the appliance is still running and the power consumption is not steady (exactly 0.0W, indefinitely) the waiting for the trigger finishing_threshold would never end/happen.

The problem with state triggers that wait for some time to be valid is that they are completely nullified after home assistant reboots, and there’s no way of getting around this, if not using some ‘helper’ variables and possibly a state machine that can ‘remember’ what was happening before the blueprint was reloaded.


To me, it seems like this blueprint is conceptually made to work this way. Maybe it’s just because it’s very ‘unlikely’ that HA or the automations get reloaded during an appliance’s cycle, or maybe because it wasn’t as meaningful to the author as it would have overcomplicated things. However, this happened many times already and deserves attention.


My solution was made for at least 4 reasons:

  1. I wanted it to work even after Home Assistant reboots or automations get reloaded, so I made the raw logic as stateless as possible.
  2. I wanted to be able to perform custom actions not just when the appliance finishes.
  3. I wanted it to be more responsive to changes in power consumption and chose not to wait for some time to pass. I thought that this would be useful to measure how long a cycle takes to complete.
  4. I wanted to make the appliance ‘aware’ of being the cause of an overload.

Obviously, this solution needs 4 of those helper entities but, in my opinion, the trade-off is worth it.

Please note that pt. 4 is optional! In the sense that: when you configure my blueprint, you can leave the “Appliance Suspended entity” empty, and it should still work.
The only difference is that you’ll never see the detached_overload state ever happen (you still have to put it in the state machine though).

I’ll update my documentation and mention it there as well.

Well, no reply after a week (or even months regarding the initial bringing up that idea point of time), unfortunately.

Just wanted to note: my forked blueprint containing these two simple additional triggers (see Notify or do something when an appliance like a dishwasher or washing machine finishes - #127 by e-raser) and setting mode to restart work just perfectly* :ok_hand::ok_hand::ok_hand: for all my use-cases (mainly powering off power plugs or sending notifications when dishwasher, washing machine etc. finished their work).

* meaning: restarting HA as well as reloading automations (which might happen A LOT sometimes) don’t break automations based on this blueprint anymore. Only “downside” is of cause they get triggered and are constantly (shown as) running (attribute current: 1) until the numeric_state condition is met - which is therefore just a cosmetic issue I warmly buy for the mentioned benefits.

1 Like

hi, where exactly did you add

- platform: event
  event_type: automation_reloaded
- platform: homeassistant
  event: start

or maybe you can share a link to your fork? ist it on github?

thanks

1 Like

All,

I’m getting this error in my trace with this BP.


Executed: July 24, 2022 at 12:25:13 PM

Error: offset should be format 'HH:MM', 'HH:MM:SS' or 'HH:MM:SS.F'

Any thoughts?

Error that popped up on the recent beta 2022.8b01

2022-07-29 23:51:30.063 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Invalid trigger configuration. Got OrderedDict([('default_config', {}), ('homeassistant', OrderedDict([('packages', OrderedDict([('automations', OrderedDict([('automation', [OrderedDict([('id', '1649570579323'), ('alias', 'Appliance has finished - washing machine'), ('description', ''), ('use_blueprint', OrderedDict([('path', 'sbyx/notify-or-do-something-when-an-appliance-like-a-dishwasher-or-washing-machine-finishes.yaml'), ('input', OrderedDict([('power_sensor', 'sensor.tasmota_energy_power'), ('actions', [OrderedDict([('ser.... (See ?, line ?). 

Hi e-raser,

Got a link to your fork? Want to share?

greetz