Last active
June 9, 2025 08:56
-
-
Save sbyx/6d8344d3575c9865657ac51915684696 to your computer and use it in GitHub Desktop.
Home Assistant Blueprint: Notify or do something when an appliance like a dishwasher or washing machine finishes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: Appliance has finished | |
description: Do something when an appliance (like a washing machine or dishwasher) | |
has finished as detected by a power sensor. | |
domain: automation | |
input: | |
power_sensor: | |
name: Power Sensor | |
description: Power sensor entity (e.g. from a smart plug device). | |
selector: | |
entity: | |
domain: sensor | |
starting_threshold: | |
name: Starting power threshold | |
description: Power threshold above which we assume the appliance has started. | |
default: 5 | |
selector: | |
number: | |
min: 1.0 | |
max: 100.0 | |
unit_of_measurement: W | |
mode: slider | |
step: 1.0 | |
starting_hysteresis: | |
name: Starting hysteresis | |
description: Time duration the power measurement has to stay above the starting | |
power threshold. | |
default: 5 | |
selector: | |
number: | |
min: 0.25 | |
max: 60.0 | |
unit_of_measurement: min | |
mode: slider | |
step: 0.25 | |
finishing_threshold: | |
name: Finishing power threshold | |
description: Power threshold below which we assume the appliance has finished. | |
default: 5 | |
selector: | |
number: | |
min: 1.0 | |
max: 100.0 | |
unit_of_measurement: W | |
mode: slider | |
step: 1.0 | |
finishing_hysteresis: | |
name: Finishing hysteresis | |
description: Time duration the power measurement has to stay below the finishing | |
power threshold. | |
default: 5 | |
selector: | |
number: | |
min: 0.25 | |
max: 60.0 | |
unit_of_measurement: min | |
mode: slider | |
step: 0.25 | |
actions: | |
name: Actions | |
description: Actions (e.g. pushing a notification, TTS announcement, ...) | |
selector: | |
action: {} | |
pre_actions: | |
name: Actions | |
description: Actions when starting threshhold is crossed | |
selector: | |
action: {} | |
source_url: https://gist.github.com/sbyx/6d8344d3575c9865657ac51915684696 | |
trigger: | |
- platform: numeric_state | |
entity_id: !input 'power_sensor' | |
for: | |
minutes: !input 'starting_hysteresis' | |
above: !input 'starting_threshold' | |
condition: [] | |
action: | |
- choose: [] | |
default: !input 'pre_actions' | |
- wait_for_trigger: | |
- platform: numeric_state | |
entity_id: !input 'power_sensor' | |
below: !input 'finishing_threshold' | |
for: | |
minutes: !input 'finishing_hysteresis' | |
- choose: [] | |
default: !input 'actions' | |
mode: single | |
max_exceeded: silent |
This works fine! Thanks for putting all this together.
Two little comments:
- The name-field for
pre_actions
andactions
is both 'Actions', this is a little confusing when using the blueprint and entering your own data (the description does contain some hints which one is which but not completely clear).- Can the
pre_actions
field be made optional? I don't need/want to use it, but if you leave it empty right now you can't save the blueprint with an error. (I know the delay-1-second workaround posted here, and yes, that works and is what I use for now).
@floriskruisselbrink just add a default [] line below
pre_actions:
name: Pre Actions
description: Actions when starting threshhold is crossed (Optional)
selector:
action:
default: []
When it will save without an defined pre_actions :)
Edit: And also you can just name it "pre action" as a name property so its more clear.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This works fine! Thanks for putting all this together.
Two little comments:
pre_actions
andactions
is both 'Actions', this is a little confusing when using the blueprint and entering your own data (the description does contain some hints which one is which but not completely clear).pre_actions
field be made optional? I don't need/want to use it, but if you leave it empty right now you can't save the blueprint with an error. (I know the delay-1-second workaround posted here, and yes, that works and is what I use for now).