Trigger when change "from above X" "to below Y"

I’d like a washing machine automation to tell me it has finished. I have obviously searched but what Ive found is not working.

First type is a simple “notify when power consumption is below X” but that triggers EVERY time power is below X, not just when finished washing.

Other is a crazy setup with booleans, multiple states and automations that didn’t work for me.

Is an “trigger when changed from above 300W to below 10W” kind of thing not possible?

make a binary_sensor that is on when above 300 W. Why care about 10W? Unless it can be on between 300 and 10w. And if that’s the case your logic is flawed and you need to re-evaluate what being on means. Anyways, here’s an example binary_sensor that will only be ‘on’ when above 300w.

binary_sensor:
- platform: template
  sensors:
    washing_machine:
      value_template: >
        {{ states('sensor.power_consumption') | float > 300 }}
      device_class: power

Then just trigger off on->off or off->on using binary_sensor.washing_machine

1 Like

using threshold sensors here for that, though you have to fiddle a bit with the actual threshold, and time it has to be on or off…

in its simplest form:

- platform: threshold
  name: 'Wasmachine Bijkeuken active threshold'
  entity_id: sensor.wasmachine_bijkeuken_actueel
  upper: 3

or, use @petro ’ suggestion and add a delay_off option to it (which I need because the machine saves power during operation by switching between 3 and 200 watt for certain periods) Using the delay_off for let’s say 10 minutes would suffice.

Thank you guys!