Automations erratically turn off and back on altogether in the same minute

As the title pretty much suggests and as the image shows - this weird thing is happening.

A little history:
It all started when one of my automations which was responsible to change the warmth of all my lights in the house twice a day when the sun would rise/set (based on elevation), started firing in a weird way. Sometimes it wouldn’t fire at all and sometimes (according to logbook) it would fire a certain time, then turn itself off and then fire again after some time (hours usually) within the same day.

After consulting with the guys in Discord I had all my configuration code checked and nowhere do I have any service calls that would turn off and back on any automation.

Furthermore I proceeded to delete all session tokens and change all my passwords for my HA instance users to be able to exclude that there might have been a hack.

However, as I can see now in the image posted from a 1-week history there are split-minutes that all of my automations turn off and back on again for absolutely no reason.

If you are using templates that don’t resolve correctly or if you have accidentally misspelled an entity id there are some services that will turn everything on or off if no valid entity id is supplied (i.e. they default to ‘all’).

This behaviour has been ‘depreciated’ (i.e. you should have to specify ‘all’) however ‘depreciated’ does not mean disabled/removed. It will still do this but should generate a warning in the log.

That’s interesting. As a matter of fact I do have some templates that do not resolve correctly , I don’t think I have misspelled an entity_id as I have double checked all of them.

Could you explain me a little more the second part of your reply? I’m having a difficult time understanding your point there about ‘dedicated’ and ‘depreciated’.

Thanks though! I’ll start looking into which templates of fine do not resolve correctly.

Spelling error/auto correct, sorry. I’ve edited it. Have another read.

So let me see if I get this straight. You’re saying that if I have some kind of automation that is like:

light.turn_on and then the data: part is templated but doesn’t resolve correctly. Then this light.turn_on or light.turn_off then this service will turn on or off everything in my configuration? Even things from other domains such as automations?

Everything in the domain of the service. So light.turn_on would affect all lights. homeassistant.turn_on would affect everything.

So here starts my problem , since in my whole config , I have nowhere automation.turn_on or automation.turn_off services. Not one. And yet as seen in my original post in the screenshots it is my automations that randomly turn off and back on in the same minute.

I do have templates inside automations that could easily not resolve properly. But those templates belong mostly to light.turn_on service calls , and to be honest I 've had no problem with the light domain.

Do those times correspond to times you are restarting homeassistant?

I am about 90% sure that no , but I’ll be checking more the following days cross-verify and come back to you on that topic.

Thanks! :slight_smile:

Hi to all of you, this is my first post.
I have issue exactly the same problem as the friend describe above, and the problem is not from same kind of hack or mistake to any automation. I am sure about that because until i start to undestand how Home Assistant works, i install several times Home Assistant on (FreeNAS 11.2 in a Jail). At all my installation i notice this strange behavior of ALL my Automation Turn OFF and then back ON and ALL at the same minute. This is happening several times in 24 hours and at random times.
If anyone have find what is happening…please explain us so we can solve it. Because some times i get inside a room and motion is not trigger it because at that exact moment the strange thing is happen again.
Sorry for my English if i make a mistake.

I have multiple device trackers setup in my “person” entity.
(Owntracks, tile, ping, nmap, netgear router) In my case. Which started happening yesterday. I was seeing a certian set of lights come on and off at random. These are the lights that are triggered by my home and away status.

Then it hit me. Im out of town and left my keys with a tile tracker attached to them at home. My wall mounted tablet also tracks the tile and so every few minutes it would show me home and then switch back to away.

I think this behavior is flawed. However. Maybe this helps. Or. Not. Good luck.