I found that the Shelly is switched on every Monday between 4 a.m. and 5 a.m. CET. I activated the protocol in the Shelly and saw that Home Assisant command comes. The same game every Monday, only the time varies something. When I deactivate the Shelly integration into HA, nothing happens. This is the proof that the order comes from HA. There is no activated automation in HA that could do this. Now I wonder what’s going on? What does HA do to turn on the Shelly switch every Monday morning? Has anyone ever had anything similar, or can there be a tip to further narrow down or fix the problem?
What does the log from the integration in Homeassistant show?
Maybe create a template switch for the Shelly Switch and then an automation?
Check all automations with trigger 4-5 am
Nothing is recorded in the LOG of the Shelly integration. There are only the regular entries about the “Uptime”. Only directly in the log of the Shelly module can I find the entries that the trigger came from Home Assistant.
I have a few template sensors for the Shelly, e.g. timer, counter and threshold sensor. There are also three automations. But no automation switches the Shelly. The template sensors cannot trigger a schedule either.
Interestingly, it always switches on Mondays, sometimes at 5:18 a.m. or sometimes at 4:57 a.m. There is absolutely no automation with a similar schedule that could trigger something like this.
There is an option for the Shelly integration to turn on debug logging. I don’t know what causes this, but maybe I can find the trigger with it.
OK, I found the problem that caused Shelly to switch on.
I use the Integration Scheduler component.
And here was an unused entity that was not saved in the dashboard. The times that switched on every Monday at sunrise were programmed in this scheduler entity.
However, this entity can only be deleted via the Scheduler: Remove service.
In this context, I found even more scheduler entities that had not been used for a long time and were no longer functional. I cleaned them up immediately.
It is noteworthy that the integration leaves fragments behind even though the timers in the dashboard have been deleted.