Error message from using automation

I have an automation for when I press an ikea on off switch it should turn off and on the lights. The lights do accordingly, no problem, But I get a message in the logs:

Logger: homeassistant.components.automation.hallway_spotlights_on
Source: helpers/
Integration: Automation ([documentation](, [issues](
First occurred: 13:51:43 (2 occurrences)
Last logged: 13:51:43

Hallway spotlights on: Already running

Im not sure but maybe it triggers an error when i try to turn off the lights and they already are off? The same happens for both pressing on and off.

That message is logged when the automation is re-triggered while the automation is already running and the automation mode is set to “single” (which is default).

you need to check the automation to see why it might be re-triggering immediately.

Or just ignore the message since it isn’t really a big deal. :wink:

It’s actually me triggering the automation by pressing off/on on the switch when it was already off/on.

I wonder if it’s possible to use some logic. It should check if the light is already off/on, then it should stop the off or on automation before it performes the action.

It’s always possible to include logic.

1 Like

I discovered it last night too so I’ll try if it works as it should (I mean if I get it working). Thank you!

I think that’s probably the easiest “solution” post I’ve ever seen.

it basically translates to “yes”.


“Yes” is so few characters. You need to master how to say little with many words.
Like politicians.

1 Like

It seems yo work so I’ll use my new knowledge. Thank you!

You can add the max_exceeded option, to your script, and specify silent to suppress the warning message.

mode: single
max_exceeded: silent

Thank you @123 That will be a good implementation.