Power Consumption Automation

Hi great community!
i´ve got a problem with an automation and i could use some advice for constructing a condition that help my situation out.

i have a Sonoff POW flashed with tasmota and connected it to my washing machine.
It sends power usage over MQTT to HA.
And then i’ve made an automation as follows:

- id: Vaskemaskine Done
  alias: Vaskemaskinen er Done
  hide_entity: true
  trigger:
    platform: numeric_state
    entity_id: sensor.vaskemaskine_strm
    below: 5
    for:
      minutes: 2
  action:
    - service: script.zanzito_send_notification
      data:
        dest_id: jdba
        message: "Washer Done Jesper, Hang it up!"
    - service: notify.jesper_op3
      data:
        message: "Washer Done"

The thing is, that it does work, BUT it also triggers randomly throughout the day! Thats quite annoying!
so i was thinking of making a condition that took in consideration that that wattage have been above 200 within the last 5 minutes. Or somthing within those lines.
I have no idea how to phrase that as a working condition though.

Anyone of you brilliant people out there have a good idea? :slight_smile:

Indentation issues :slight_smile:
Try this:

- id: Vaskemaskine Done
  alias: Vaskemaskinen er Done
  hide_entity: true
  trigger:
    platform: numeric_state
    entity_id: sensor.vaskemaskine_strm
    below: 5
    for:
      minutes: 2
  action:
  - service: script.zanzito_send_notification
    data:
      dest_id: jdba
      message: "Washer Done Jesper, Hang it up!"
  - service: notify.jesper_op3
    data:
      message: "Washer Done"

as for the 2nd problem. Not sure if it works like that, but you could add a from: 200 before the below: 5

Did you ever get around to solving this? I’ve been playing with this kind of notification for a while, but I’m having similar problems with ‘false positives’ and/or the notification being triggered when HA restarts…

Nope unfortunately not.
I’ve abandoned the project for the time being.
But if you find a solution I would gladly appreciate if you threw a message about it here :wink::+1:

I think there have been some discussion in some other topics about this. The easiest sollution would probably be to use an input_boolean which is set only when the power goes >200 for x number of minutes and off when the power goes <5 for 2 minutes. Send a notification based on the input_boolean being switched off.

1 Like

That was actually a really good idea. Must look into that at some point :slight_smile: Thanks

If you figure out please share. I am also trying to get this figure out. I can see my power usage peak for few seconds for over 2000w and then runs below 200 for serval minutes and then when it is done remains around 1W

Not sure if conditions would help but cannot figure out

The POW isn’t that stable in the low power range, or precise for that matter.