Why isn't this automation working?

Hi

I wrote this automation:

alias: Spülmaschinen Fertigmeldung
description: ""
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.spulmaschine_power
    attribute: power
    above: 1000
    enabled: true
condition: []
action:
  - condition: numeric_state
    entity_id: sensor.spulmaschine_power
    attribute: power
    below: 1
  - delay:
      hours: 0
      minutes: 10
      seconds: 0
      milliseconds: 0
  - if:
      - condition: numeric_state
        entity_id: sensor.spulmaschine_power
        attribute: power
        below: 1
    then:
      - service: notify.mobile_app_iphone_13_pro_max_te
        metadata: {}
        data:
          title: Spülmaschine
          message: Ich bin fertig, mach mich auf!
      - service: notify.mobile_app_iphone_13_me
        data:
          title: Spülmaschine
          message: Ich bin fertig, mach mich auf!
    else:
      - repeat:
          sequence:
            - service: notify.mobile_app_iphone_13_pro_max_te
              metadata: {}
              data:
                title: Spülmaschine
                message: Ich bin fertig, mach mich auf!
            - service: notify.mobile_app_iphone_13_me
              metadata: {}
              data:
                message: Ich bin fertig, mach mich auf!
                title: Spülmaschine
          until:
            - condition: numeric_state
              entity_id: sensor.spulmaschine_power
              attribute: power
              below: 1
mode: single

See anybody here the problem, why the automation is not working?

You are triggering when the value goes above 1000 and then immediately requiring that it be below 1… that is very unlikely.

Explain what you are actually trying to do.


this is the power diagram.
my idea was to start the automation when power is > 1.000 W and then the automation should go on when the value drops lower 1 W…

Then you need to use a Wait for Trigger action.

There are a couple Blueprints available to address these situations:


okay so this should work?
I will try it and give feedback in a few days :smiley:
thanks!

Seems a little bit overcomplex. :wink:
Do I understand right that you are interested in the moment where the power goes down because this indicates the end of the dishwasher process?

Then simply trigger on below 20 W or so.
Without any delay.
Like this:

trigger:
  - platform: numeric_state
    entity_id:
      - sensor.spulmaschine_power
    attribute: power
    below: 20

This will start the automation when the power comes from over 20 and gets lower than 20.

For that to work you would need to include:

  1. A duration for the trigger, to avoid false triggers between the two parts of the cycle.
  2. A condition to negate trigger events from the power sensor changing from “unavailable” or “unknown” to any value below 20.