Automation "already running"?

hello,
i regularly do have this warning in my logs, not sure if this is a problem, but sometimes hassio is very slow, so i wonder if this is related to?

i understand that automation is still running, when a new trigger is fired und this message could be “suppresed” by max_exceeded silent.
But i dont understand why this automation could sill running, why does it not end?
when does a mode: single automation stoppes action?

and what i dont understand: 1 occourances, last logged at the same time as first? what does it mean´for automation? could it now still finisihed running? But only at this moment of a trigger it was still running and is logged?
is it possible to log, when a automation is triggered and when it has successfull stopped from running?

Logger: homeassistant.components.automation.heiz_bad_v4
Source: helpers/script.py:1783
Integration: Automation (documentation, issues)
First occurred: 07:00:00 (1 occurrences)
Last logged: 07:00:00
Heiz_Bad_v4: Already running

here my automation: what could prevent is from stopping?

alias: Heiz_Bad_v4
description: ""
trigger:
  - platform: state
    entity_id:
      - schedule.heiz_bad
    from: "off"
    to: "on"
  - platform: state
    entity_id:
      - schedule.heiz_bad
    from: "on"
    to: "off"
  - platform: state
    entity_id:
      - schedule.heiz_bad_boost
    from: "off"
    to: "on"
  - platform: state
    entity_id:
      - schedule.heiz_bad_boost
    from: "on"
    to: "off"
  - platform: state
    entity_id:
      - input_boolean.heiz_mainswitch
    from: "on"
    to: "off"
  - platform: state
    entity_id:
      - input_boolean.heiz_mainswitch
    from: "off"
    to: "on"
condition: []
action:
  - service: climate.set_temperature
    data:
      temperature: >-
        {% if ( (is_state('input_boolean.heiz_mainswitch','on')) and
        (is_state('schedule.heiz_bad_boost','on')) ) %}   
          {{ states('input_number.heiz_bad_tempboost') }}
        {% elif ( (is_state('input_boolean.heiz_mainswitch','on')) and
        (is_state('schedule.heiz_bad','on')) ) %}   
          {{ states('input_number.heiz_bad_temphigh') }}
        {% elif  ( (is_state('input_boolean.heiz_mainswitch','on')) and
        (is_state('schedule.heiz_bad','off')) ) %}   
          {{ states('input_number.heiz_bad_templow') }}
        {% elif  ( (is_state('input_boolean.heiz_mainswitch','on')) and
        (is_state('schedule.heiz_bad_boost','off')) ) %}   
          {{ states('input_number.heiz_bad_templow') }}
        {% else %}
          6  {# just for monitoring#}
        {% endif %}
    target:
      entity_id: climate.trv_56_heizung_bad
  - service: climate.set_hvac_mode
    data:
      hvac_mode: |-
        {% if is_state('input_boolean.heiz_mainswitch','on') %}   
          heat
        {% elif  is_state('input_boolean.heiz_mainswitch','off') %}   
          off
        {% else %}
        {% endif %}
    target:
      entity_id: climate.trv_56_heizung_bad
mode: single

thank you in advance
br
Frank

an automation stops as soon as it is done with all actions.
from the yaml, I do not see that it would take long.
when opening the automation, you see traces at the right top corner.
then you can check what happend the last 5 runs. (you can modify the amount but 5 is default) this I think is the log you are looking for and might gives you a clue

1 Like

hi @bkbartk

oh cool :smile:, i had seen this traced once in he past, but i didnt understood the usage… unfortunately it is not possible to show stepDetails, TraceTimeline in one view at same time, so it took me a while to understand the situation by switching both and cycle thru all traces …

mmm :thinking: i think it is caused, by cascading of two schedule.helpers? it might this 0.11 seconds of running time of the first trace, when the second trace is fired?
unfornutately schedule.helpers can only set in 30 minte steps and not in single minutes. :disappointed_relieved: Ill try to extent the schedule ranges to prevent a trigger of both at same time, or is there another possibilty to handle?

image

image

thanx @bkbartk this helped me a lot!
br
Frank

It’s my understanding that is a limitation of the UI’s representation of a schedule entity, not the schedule entity itself. You can define a schedule using YAML and set the start and end times to whatever you need.


If you set the automation’s mode to queued then if the automation is busy when it’s triggered again, it will process it after it’s finished.

1 Like