Automation is triggered, but action

Hi!

I have two automations to close blinds that don’t work at all.

  1. Open Curtain every morning at 05:10
  2. Close Blinds at sunrise
  • When I manually “Run” the automation, it works
  • In “Trace Timeline”, it show the automation running fine, but the covers won’t actually close

Example of the second one bellow:
Step Details:
image

Automation Config:

id: '1726879843474'
alias: Close Blinds Morning
description: ''
trigger:
  - platform: sun
    event: sunrise
action:
  - action: cover.close_cover
    metadata: {}
    data: {}
    target:
      entity_id: cover.cortina_curtain
mode: single

Trace Timeline:

That is bizarre. Could you download and post the full trace (formatted as code like your automation config above), found under the three dots menu top-right of that screen/

Like this? Thanks for the response. I speak portuguese, so some descriptions are in my language
Fechar Cortina Manhã = Close curtain morning

{
  "trace": {
    "last_step": "action/0",
    "run_id": "30803da1e412525976382c9fe1427238",
    "state": "stopped",
    "script_execution": "finished",
    "timestamp": {
      "start": "2024-10-17T08:25:40.810916+00:00",
      "finish": "2024-10-17T08:25:41.406243+00:00"
    },
    "domain": "automation",
    "item_id": "1726879843474",
    "trigger": null,
    "trace": {
      "trigger": [
        {
          "path": "trigger",
          "timestamp": "2024-10-17T08:25:40.811091+00:00",
          "changed_variables": {
            "this": {
              "entity_id": "automation.fechar_cortina_manha",
              "state": "on",
              "attributes": {
                "id": "1726879843474",
                "last_triggered": "2024-10-17T08:13:21.603889+00:00",
                "mode": "single",
                "current": 0,
                "friendly_name": "Fechar Cortina Manhã"
              },
              "last_changed": "2024-10-15T22:40:25.534987+00:00",
              "last_reported": "2024-10-17T08:13:22.192925+00:00",
              "last_updated": "2024-10-17T08:13:22.192925+00:00",
              "context": {
                "id": "01JACRKPT1PGFT5TBD01T1674Z",
                "parent_id": null,
                "user_id": null
              }
            },
            "trigger": {
              "platform": null
            }
          }
        }
      ],
      "action/0": [
        {
          "path": "action/0",
          "timestamp": "2024-10-17T08:25:40.812247+00:00",
          "changed_variables": {
            "context": {
              "id": "01JACSA8PA6644ZD43137A38G3",
              "parent_id": "01JACSA8P9GD6KGG9JQCFDD0GN",
              "user_id": null
            }
          },
          "result": {
            "params": {
              "domain": "cover",
              "service": "close_cover",
              "service_data": {},
              "target": {
                "entity_id": [
                  "cover.cortina_curtain"
                ]
              }
            },
            "running_script": false
          }
        }
      ]
    },
    "config": {
      "id": "1726879843474",
      "alias": "Fechar Cortina Manhã",
      "description": "",
      "trigger": [
        {
          "platform": "sun",
          "event": "sunrise"
        }
      ],
      "action": [
        {
          "action": "cover.close_cover",
          "metadata": {},
          "data": {},
          "target": {
            "entity_id": "cover.cortina_curtain"
          }
        }
      ],
      "mode": "single"
    },
    "blueprint_inputs": null,
    "context": {
      "id": "01JACSA8PA6644ZD43137A38G3",
      "parent_id": "01JACSA8P9GD6KGG9JQCFDD0GN",
      "user_id": null
    }
  },
  "logbookEntries": [
    {
      "name": "Fechar Cortina Manhã",
      "message": "triggered",
      "source": null,
      "entity_id": "automation.fechar_cortina_manha",
      "context_id": "01JACSA8PA6644ZD43137A38G3",
      "domain": "automation",
      "when": 1729153540.8112898
    },
    {
      "state": "closed",
      "entity_id": "cover.cortina_curtain",
      "when": 1729153542.408836,
      "context_event_type": "automation_triggered",
      "context_domain": "automation",
      "context_name": "Fechar Cortina Manhã",
      "context_message": "triggered",
      "context_entity_id": "automation.fechar_cortina_manha"
    }
  ]
}

Which integration are you using to allow control of the curtains?

I have some news. After modifiying my blackout cover template, somehow the automation worked today. Don’t actually know what I did.
But the other one didn’t open the cover.cortina_curtain

I control both of them with Tuya devices

  • The cover.cortina_curtain is a Curtain Tuya Module.
  • The blackout (the one that started working today) is a standard Tuya Contact Switch and I use the cover template below:
- platform: template
  covers:
    blackout_quarto:
      device_class: curtain
      friendly_name: "Blackout"
      optimistic : true
      open_cover:
        action: script.abrir_blackout
      close_cover:
        action: script.fechar_blackout
      stop_cover:
        action: script.parar_blackout