All automations show "no traces found"

Hi all, not sure if this is the best category to post.

All my automations show “no traces found”, even though they trigger. They used to work, are created in yaml with unique IDs. It seems like it happened since updating to 2022.2, but I’m not sure. I am running a supervised (supported) install, all latest versions. I’ve got many log errors and warning, but none seem relevant. I have restarted core first, and host afterwards, no resolve. Can someone please guide me how to debug?

No advice on debugging, but FWIW, Running HAOS 2022.2 in VirtualBox on Windows 10 and traces are OK here.

The automation has been triggered? Try restart or ctr+F5 or create a new one to check if traces.

I am having the same problem running HASS OS. This used to work fine prior to 2022.2.

The same here.

Ditto. No traces on automation that are new and old ones that use to have traces have stopped showing

Alright I narrowed down my culprit seems like the

|

Character is not allowed in the ID. Removing it restored my tracing functionality

Hello,
I’m having the same issue, running on Raspberry / Docker. Version 2022.2.9.
No more traces for all my automations, altough a lot have been running in the past days.

Thanks

Matthieu

I checked, all my “ids” are unique & without any special charachter, remains char + digits + “_”.
But still no trace. It used to work in the past (weeks ago) and I definitively missed this.

The same for me. “No traces found”. Unique IDs are OK. Tried to crete a few new automations - same result. Tried to remove /.storage/trace.saved_traces - after restart it was restored by HA, but didn’t helped

Found the solution: after changing my ID’s names like that, traces started to show up normally:
Example code:
From: - id: Kitchen Spotlights Motion Off’
To: - id: ‘Kitchen-Spotlights-Motion-Off’

1 Like

Thank you so much for sharing this work around.

This automation ID has been sneaked in as a requirement with very little explanation and as far as I can tell not documented at all.

I read in this forum that you could put any string as ID so I just copied the text from the alias.

Why doesn’t the code use the Alias as ID if there is no ID? OK so I spent hours adding IDs to more than 200 automations.

And now today I spent two hours replacing all spaces by underscores. Just to get the UI for debugging automations working again.

And what I do not understand. When you change the ID you have a ghost automation entity listed but greyed out and you have to manually delete them one by one. The code does not clean up. That alone took 30 minutes because there is no bulk deletion feature.

That could have been implemented better. The Alias could have worked as ID. The change of the code to no longer accept spaces was not needed. The code should remove automation entities when the automation is no longer in the yaml files. At least when you restart HA

Edit: It is even worse. When you edit the ID all your automations are added with new entity name ending with _2. So anywhere you have used these entity names in the UI or other automations things break. Why does it create a new entity when you have not changed the alias??? Another hour went walking through all the entities matching automation.*_2 removing the _2 from the name.

Thanks for the tips,
Adding a unique ID, without spaces for each Automation solved the problem. Took a long time to get them all done. Now I still have to go and remove the duplicate automations that have been created.
I don’t remember seeing any mention of this requirement in the release notes. sigh.

You made my day.

I did a Python to do the replacement automatically (setup the directory name)


import os

def onefile(f):

    with open(f, 'r') as reader:
        lines = reader.readlines()

        for x,line in enumerate(lines):
            if "- id: " in line and "{{" not in line:
                lines[x] = line[0:6] + line[6:].replace(" ", "_")

    with open(f, 'w') as writer:
        writer.writelines(lines)


directory = "xxxx"    
for file in os.listdir(directory):
    f = os.path.join (directory,file)
    if os.path.isfile(f) and ".yaml" in f:
        print(f)
        onefile(f)

1 Like

wow, thanks for this, Ive been knocking my head against the wall…

and yes, this really feels like a serious bug. Hope it can be fixed…

Tnx @SenMorgan, this solved it!

Really annoying, has been working for year(s)…

1 Like