Dishwasher automation with condition

Hi,

Trying to make our not very smart dishwasher to tell me when it is finished. I know, there are plenty of automations out there that does that but I can’t find one that fits my needs.
Actually it’s not that complicated. I’m using a smart plug that measures the power and when the washer is done, it turns off and drops to 0 watts, so the automation is quite simple to send a message at 0 W. What I’m struggling with is that I want it to do this only if it has reached over a threshold of X watts for Y minutes. The reason is that my kids often turns the power on (why can’t the power button be locked?) and we have to power it off and I don’t want that to trigger a message.
So what i need is a condition that says that the power must first have reached over a certain level before the message is sent when it drops to 0.

Thanks in advance!

I did this work well

then I add this

- id: f933e5a0-352c-4146-80d6-64ca01bae140
  alias: Dishwasher_door_open
  initial_state: true
  trigger:
    - platform: state
      entity_id: binary_sensor.dishwasher_door
      to: 'off'
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: sensor.dishwasher_status
        state: 'Clean'
  action:
    - service: notify.alexa_media
      data_template:
        data:
          type: announce
        target:
          - media_player.lounge
        message: 'Thanks for doing that job.'
    - service: input_select.select_option
      data:
        entity_id: input_select.dishwasher_status
        option: Dirty

Thus is a great solution, it works well, but it might need a little tweaking. If you run a cycle on the dishwasher while watching the power draw for each stage of the cycle you can plug the numbers into the automation.

true Bro had play around the the above and below values