Problem calling a script from an automation when renaming the script

Both traces come from the same device… the only difference is that I did renaming between 1 and 5. First, I renamed the names only. Then, yesterday when you mentioned the entity id, I renamed the ID…

Button 3 works as expected. But buttons 1 and 5 keep changing their names and calling the other (original) script… It is like if the entity ID was replaced with an UUID and different parts of the Database have the UUIDs out of sync… now… I do not know what I am talking about but it feels something like that…

Now… to your point… the failing button has more lines in the tracelog… I wonder if something else is not calling the script again…

EDIT: Never mind… more bulbs…

Both of those traces show that both runs worked properly. the first 1 ran script.scenecontrol_livingroom_scene001, the second rand script.scenecontrol_livingroom_scene003.

There are no references to script.scenecontrol_livingroom_scene005 in the script.scenecontrol_livingroom_scene001 run.

Yes but this is shown in the 001:

action/1": [
        {
          "path": "action/1",
          "timestamp": "2024-03-04T15:28:56.872215+00:00",
          "child_id": {
            "domain": "script",
            "item_id": "scenecontrol_livingroom_scene001",
            "run_id": "7726a8d1899b072219f3188804b24c7e"
          },
          "result": {
            "params": {
              "domain": "script",
              "service": "scenecontrol_livingroom_scene001",
              "service_data": {
                "attribute_id": "KeyPressed"

and later in the same file:

{
      "name": "SceneControl_LivingRoom_Scene005",
      "message": "started",
      "entity_id": "script.scenecontrol_livingroom_scene005",
      "context_id": "01HR51A4H3358Z1WVN1XFM923F",
      "when": 1709566136.873022,

That’s just a logbook entry. That does not mean the service call ran that service.

then the service call

So the fact that 001 has no tracelog and 005 has one at the same time the automation fired means there are two things firing at the same time…
Right?

Yes, but it’s not coming from this automation. I’m not sure how else to tell you that, but you keep focusing on that. It’s coming from another automation.

Thanks for your help!

I learned several things yesterday/today… how to work with the traces, the meaning of the trace log, how to make my automation using the template to call a service…

You helped me a lot… Will dig through the other automatons and see if I can find the one racing for this… will also modify the other Automatons to use templates and I will let you know what I get to!!

Thanks a lot!

Another question… is there any way to know what triggered the scene? that Automation is the only one that I see is being triggered.
If I press the button, it is the only one that says “Last triggered, 1 minute ago”.

Further more, if I disable that Automation, nothing happens… but if I enable it again and press button 5, scene 001 scrip gets executed…

Are you sure you didn’t mix up the naming? I.e. 1 is named 5 and 5 is named 1 but the entity_id’s are opposite?

Yes, that was the problem yesterday… and I renamed them… today they are the same…

I am trying two things now:
Full reboot… waiting on that…
Reading about the trace logs… trying to learn what the context id and parent_id mean and if I can recreate what triggered what… although by disabling the automation I proved that there is likely nothing else calling it…

After the reboot I will try again, and re-check the name/entity_ids

Still the same behavior after rebooting… I’m still thinking something happened when I renamed the scenes… ??

image

image