Delay action causing unexpected automation behaviour - known issue?

For some time now I’ve been noticing that some of my automations are not behaving as expected due to the ‘Delay’ action. Has anyone else been experiencing this issue?

Is this a known problem?

Thanks

How long is the Delay action?

Is only 45min.

:smiley:
Only 45 minutes…

Most people draw the line at a minute or two. More than that and and you should not use a delay.

Post the automation

1 Like

Longer than most average delays…

Edit… what Hellis81 said :grin:

Additional context STOP a running automation (NOT TurnOff)

But this automation worked for years, and now is giving me problems.

alias: VMC - Humidade WC N3
description: "se wc hum > wc hum_média2h+20% = vmc n3 "
triggers:
  - entity_id:
      - sensor.amb_wc_relative_humidity
    for:
      hours: 0
      minutes: 0
      seconds: 5
    above: 75
    enabled: true
    trigger: numeric_state
conditions: []
actions:
  - action: switch.turn_on
    metadata: {}
    target:
      entity_id: switch.on_off_state_2
    data: {}
  - delay:
      hours: 0
      minutes: 0
      seconds: 10
      milliseconds: 0
  - data:
      value: "3"
    target:
      entity_id: number.ventilation_speed_set_2
    action: number.set_value
  - data:
      data:
        ttl: 0
        priority: high
      message: WC Hum VMC n3
    action: notify.mobile_app_amagro
  - wait_for_trigger:
      - entity_id:
          - sensor.amb_wc_relative_humidity
        below: 75
        trigger: numeric_state
        for:
          hours: 0
          minutes: 0
          seconds: 10
    enabled: true
  - delay:
      hours: 0
      minutes: 45
      seconds: 0
      milliseconds: 0
    continue_on_error: true
  - choose:
      - conditions:
          - condition: and
            conditions:
              - condition: numeric_state
                entity_id: sensor.casa_co2
                above: 750
              - condition: time
                before: "12:00:00"
        sequence:
          - wait_for_trigger:
              - trigger: numeric_state
                entity_id:
                  - sensor.casa_co2
                below: 600
  - condition: state
    entity_id: binary_sensor.exaust_vent
    state: "off"
    for:
      hours: 0
      minutes: 0
      seconds: 0
  - device_id: 9dc78c0d4d5b001e6d014f691be0cf57
    domain: climate
    entity_id: climate.nilan_2
    type: set_hvac_mode
    hvac_mode: heat
  - data:
      value: "1"
    target:
      entity_id: number.ventilation_speed_set_2
    action: number.set_value
  - data:
      data:
        ttl: 0
        priority: high
      message: WC Hum VMC n3 OFF
    action: notify.mobile_app_amagro
mode: restart

Is this an action?

Yes, is to change the mode of the VMC to “heat”.

Why do you think the error is with the Delay action?

1 Like

Do you have any traces that show the delay being the problem?

Because that action was not executed.

That is because of this:

1 Like

I don’t really understand why you trigger on above 75 humidity.
Then wait for it to get below 75, and then wait 45 minutes.

Why not trigger when the humidity is below 50% or whatever you want it to be?
Or when it is close to what the humidity is in the living room or something

This was determined through observation, by waiting 45 minutes after humidity drops below 75%, I’m able to clear all the condensation from my bathroom.

The humidity in the rest of the house sits around 60%, so in the bathroom, after a shower, dropping back down to 60% would happen too quickly - it would clear the moisture in the air, but not on the walls, mirrors, and so on. The delay ensures that all of this residual moisture is fully removed.

Time is a constant with no variables, but humidity changes with the current environment. A humidity sensor in your bathroom would benefit you greatly. That sensor status could be a condition in your Automation.

I also have a humidity sensor in the bathroom - the 75% threshold in this automation comes directly from that sensor’s readings.

Then why not this suggestion vs time? :up_arrow: It’s late for me, I may be confused…

Because, as I mentioned earlier, the humidity will only drop down to 60% (the general house humidity level) and it will do so very quickly, which doesn’t give enough time to clear the surface moisture.
I need the MVHR to stay on for a little longer to clear all the remaining moisture.

Why the issue with the Delay action is in the Mode state?