Mystery running of automations

I have mentioned this before, but this is a total mystery for me.
For the past few weeks, several automations, all with OFF included in the name, run randomly several times a day.

I have tried to identify why, but no success.

I have deleted some of the automations and created them from scratch again, but still same problem.

Any suggestions are welcome.

Post the code of the automation.

(It goes without saying, I think, but putting the word “off” in the name by itself won’t prevent the automation from running)

This one of them

alias: "# Salon ALL OFF"
description: ""
triggers:
  - type: turned_off
    device_id: 1ad3acffaf9c8ae0f334c21046ec3fe9
    entity_id: 7d398a7bb5c8f12abd00fce9026d6df4
    domain: switch
    trigger: device
conditions: []
actions:
  - target:
      entity_id:
        - light.salon_lamp_left
        - light.salon_floor_right_light
    data: {}
    action: light.turn_off
  - target:
      entity_id:
        - switch.salon_closet_1
        - switch.salon_closet_2
        - switch.salon_ceiling_entrance
        - switch.salon_ceiling_light
        - switch.salon_dining_sconces_2
        - switch.salon_counter_lamps_2
    data: {}
    action: switch.turn_off
  - delay:
      hours: 0
      minutes: 0
      seconds: 10
      milliseconds: 0
  - type: turn_off
    device_id: 7bb10aafa2380e3d86315bc7b0ca1be1
    entity_id: dba8092dc9940f6156aa0e62ca9c77f8
    domain: light
  - type: turn_off
    device_id: e9856748163276ed08dadbaab96431d0
    entity_id: 075f714c3ff16a1153f7e31a0f5bd409
    domain: light
mode: single

Thanks. What is wrong with the automation running, exactly: is it that you are sure that the trigger hasn’t occurred, or for some other reason?

100 % sure that these automations were not triggered. Sometimes when they run I am not even home and some should only be triggered by manually pressing the wall switch.
The posted automation is one out of some 8 that run spontaneously at the same time.

Did you look at a trace to see if there were any details on the trigger?

How would I do that ?

How are you achieving this? I’m not aware of any trigger that only works when you manually turn something on. You realize if another automation turns off this switch, this automation will be triggered by that action?

I have a wall switch that has no load. When I click up it triggers an automation that turns on several lights, and the same when I click it down (turning lights off).

The load is irrelevant in this conversation. The switch can still be manipulated in an automation.

Traces are available by selecting the 3 dots to the right of an automation and click “Traces”. This will tell you how the automation was triggered.

Thanks for this tip. Hopefully useful.

I have exactly the same problem. 2 scenes (“curtains open/lights off” and “curtains close/lights on”) are now and then triggered spontaneously at the same time. I checked the traces and see that my the “Fibaro Z-Wave dimmer2” module was triggered (see picture below). However for sure the module was not touched at all.
Since about half a year I switched from Domoticz to Home Assistent so I’m not that experienced yet but to me it looks a bug in Home Assistent. I don’t think it is the module since 2 modules are triggered exactly at the same time.
Has anyone an idea how to solve this?
kind regards,
Wil

It is still a mystery for me as well.
In my case it was a matter of automations running spontaneously without an identifiable trigger. Weirdly enough I have nothad any such event for several days and the only change I made was replacing the “OFF” in the name of the automation to “UIT” (I am Dutch like you). It makes zero sense to me that changing the name of an automation would have any impact, so it may be something different, possibly the latest update of the HA Core…

One thing that comes to mind as a possible cause (though maybe not for names containing OFF).

Are you using labels to turn things on, and could those labels also be associated with scripts? If you turn a script on, it runs.

No, I don’t have labels in HA. I only have a script which opens de curtains which is triggered by the 2nd input of the Fibaro z-wave dimmer. The trace just tells me that this switch was activated but it was not. So weird that HA thinks that this switch was activated. First I thought that maybe the z-wave dimmer suddenly incorrectly sent the trigger. However because I see that 2 fibaro z-wave switches are activated at the exact same time, it must be HA I would say.

If it is a switch or light working of mains, it could be as simple as a power glitch.

It could well be a bug in HA Core as it compares to my events.

Thanks for you thinking. A power glitch could at least explain that 2 modules are having the issue at the same time. On the other hand, at the moment it happened I was just sitting on the couch watching TV. The lights were not flikkering nor any other symptom of a power glitch occurred. I have a new house so the electrical wiring should be reliable (which does not mean it cannot occur of course) but it happened now 3 time in about 6 weeks and every time it were the 2 same modules at the exact same time (while I have more than 10 of those modules. So still a mystery to me.

thanks again and kind regards,
Wil

That indeed does not suggest power outages. I own lots of dimmer 2 modules and never had anything like this. I must admit there are not that many automations that would stand out if it happened for me though, so I might not have noticed if it did. I use a lot of associations to make sure things keep working if HA fails. Do you have associations for the devices that act up?

I was also wondering if ZVaveJS UI could have something to do with it and if you can troubleshoot there as well.

Did you check for unavailable in. the automation? The integration going unavailable or returning from it might also trigger your automation. If you show the trigger, I could help protect it from that.

Hi Edwin,
thanks again for your analysis. With associations you mean a direct connection between 2 modules and by-pasing HA, correct? I don’t have them and I wonder it would be possible for my automation because I trigger a script with several items in it.

Since the Zwave is not directly imbedded in HA but via the add on “Z-wave JS” I re-installed this Z-wave because I assume this is not done automatically when updating HA. I hope this solves the issue.

You also mention “Did you check for unavailability in the automation?” What exactly do you mean? I know that when I update HA that after the update finished, often several automations are triggered. I only don’t know how I can “show the trigger”.
thanks and regards,
Wil