How interpret the Automation is unavailable flags?

  1. Sometimes an Automation will show as “Automation is unavailable” in the UI for that Automation with some “flags / tags” below. Example:

image

Is there a guide or post on how to interpret these tags? What are they saying/meaning?
What does data[1] refer to? I’m guessing the above example relates to the Actions section and ‘choose’ ‘sequence’ etc., but I’m not clear how to track it’s meaning through my code to wherever it’s pointing (if it’s meaningful). What do the [9] numbers mean?

  1. Any suggestions please re how else best to “debug” YAML scripts/automations when you’ve got an error that won’t even let it run to give a Trace, etc. (I use the Studio Code Server add-on but sometimes that does n’t spot the issue and it saves ok, but won’t run.)

Many thanks.

You likely have a bad indent, missing quotes, or missing hyphens. Usually, I would expect to see it say `@data[‘action’][0]… post the YAML for the whole automation.

The index numbers represent which item in the named array you should look at, zero means the first item, 1 the second, etc.

Hi, and thanks Drew.
I was hoping to learn how to interpret the “tags”, which your advice helps with, and thus learn how to solve the issue myself. Cannot rely on the Community’s great generosity for ever… I need to learn!

Besides. it’s a complex YAML automation (half or less complete) currently with 2 trigger IDs, and 2 levels of ‘choose’ in the Action. I’ve had the 1st Trigger’s part working ok (and saved it for backup), then added the next block and it faltered. Probably, as you say, a trivial indent error, extra character or omission. I’ll follow your explanation and see if I can figure it. If not found, I’ll go back to my saved version and gradually add the new code to pin the issue down. If still not solved, I may be back with the YAML!!!

2 Likes

Hi, and thanks Tom.
Unfortunately I don’t have a line number (which I’d have understood just fine). I just have the info in the example I posted with the [‘tag’][9] type entries.(My example was copied from the Settings/Automation & Scenes/ and Select the “Unavailable” automation. The Error as posted appears at the top of that automation’s UI page.

It’s the meaning and thus tracing down of the [9] entries that’s unclear to me. Clearly they also start from 0. Obviously they are n’t simple sequential counts from the top down, so are they counts down of the items within each previously mentioned [‘tag’] block?

Or is there some more detailed Logging somewhere (like you exampled) that I’m missing seeing?
I see the logs and traces when my scripts/automations run - but when they won’t even run/are unavailable is there something for that too?

[ Re the specific error that I had - I did sort it - by reverting to my ‘backup’ version and retyping + some copy&paste of blocks of my ‘faulty’ code. It then worked first time. I half suspect I’d somehow got a hidden character into my faulting YAML code, because I could n’t see any issues with it. One learns.]

That is explained in the post I linked to.

Ahh. Many thanks Tom. I’d (obviously) missed the link in there. Very helpful (as always), and much appreciated. I think I’ve also just found the Logs you referred to.