Automation issue - triggered but stays unexecuted?

Hi, any ideas why this automation doesn’t execute its tasks?
It has always worked before this week, so I don’t understand what is going wrong now
as you can see here, it was triggered but none actions has been taken.


also the other tabs:

what I already tried: copy the automation and give it another name but the issue stays

the automation:

alias: Somfy
description: ""
triggers:
  - at: "08:45:00"
    id: morning
    trigger: time
  - at: "18:45:00"
    id: evening
    trigger: time
  - event: sunset
    offset: "-00:15:00"
    id: before_sunset
    trigger: sun
  - event: sunset
    offset: "-00:20:00"
    id: before_sunset_zolder
    trigger: sun
  - at: "20:30:00"
    id: night
    trigger: time
conditions: []
actions:
  - choose:
      - conditions:
          - condition: trigger
            id: morning
          - condition: numeric_state
            entity_id: sensor.knmi_max_temperature_today
            above: 2
            below: 25
        sequence:
          - target:
              entity_id: "{{ all_covers }}"
            action: cover.open_cover
      - conditions:
          - condition: trigger
            id: morning
          - condition: numeric_state
            entity_id: sensor.knmi_max_temperature_today
            below: 2
        sequence:
          - variables:
              remote_used: >-
                {{ state_attr('sensor.esp_afstandsbediening_gebruikt_vandaag',
                'output') }}
          - data:
              title: Buiten temp is below 2 degrees
              message: >-
                Covers stay close! {% if remote_used != 'Geen somfy
                afstandsbedieningen gebruikt vandaag' %} Warning. A cover is already opened: {{ remote_used }} {% endif %}
            action: notify.family
      - conditions:
          - condition: trigger
            id: morning
          - condition: numeric_state
            entity_id: sensor.knmi_max_temperature_today
            above: 25
        sequence:
          - variables:
              remote_used: >-
                {{ state_attr('sensor.esp_afstandsbediening_gebruikt_vandaag',
                'output') }}
          - data:
              title: Outside temperature is 25 degrees or more
              message: >-
                Covers stay closed. 
                {% if remote_used != 'Geen somfy afstandsbedieningen gebruikt vandaag' %} 
                Warning. A cover is already opened: {{ remote_used }} {% endif
                %}
            action: notify.family
          - delay: "01:00:00"
      - conditions:
          - condition: or
            conditions:
              - condition: trigger
                id: evening
              - condition: trigger
                id: before_sunset_zolder
        sequence:
          - target:
              entity_id: "{{ night_covers }}"
            action: cover.close_cover
      - conditions:
          - condition: or
            conditions:
              - condition: trigger
                id: before_sunset
              - condition: trigger
                id: night
        sequence:
          - target:
              entity_id: cover.somfyroom5
            action: cover.close_cover
            data: {}
mode: single
variables:
  all_covers:
    - cover.somfyroom1
    - cover.somfyroom2
    - cover.somfyroom3
    - cover.somfyroom4
    - cover.somfyroom5
  night_covers:
    - cover.somfyroom1
    - cover.somfyroom2
    - cover.somfyroom3
    - cover.somfyroom4

Difficult to say unless you provide the code for the automation

I added the automation, but apart from this, it is strange behavior, right?

I looks like it has not been triggered at all from that picture and the trace timeline is empty. Yes, for me it also looks weird. And of course the obvious thing you have checked:

  • It works when manually executed
  • The automation is not deactivated
  • logs

download the trace json and post it here. it will tell exactly what’s going on.

Hi Bowa,

Make sure you are looking at the right trace. Many devices will trigger to wake up, trigger to do the auromation, then triffer again to go to sleep, or variations on that theme. The last trace may not be the one that you are looking for.

OK its working now. the cause:

as you can see here, the “-” sign is placed at “target” instead of the “action” line.
After I fixed this in the whole automation, it just started again. Still find it strange.

so before:

        sequence:
          - target:
              entity_id: "{{ night_covers }}"
            action: cover.close_cover

after

        sequence:
          - action: cover.close_cover
            target:
              entity_id: "{{ night_covers }}"