Automation events troubleshooting

Hi,

I’ve been using HA (Hassio) for a while now and recently configured an automation based on geolocation (Owntracks) and Presence Detection (Router Huawey). When I enter the geolocation “HOME”, it turns a sonoff basic ON and then I turn it off manually. The automation works OK when I arrive home but what happens is that when I wake up, the lamp is turned on again. I can see on the events that the lamp turned on but I don’t see the automation event. I know that throughout the night, the presence detections shows several events due to Wifi losing connection but I don’t really leave the marked area.

Example of an automation event that runs as it’s supposed too:
20:45 - Candeeiro Hall turned off --> I manually turned off the sonoff
20:43 - Luzes turned on --> “Lights” group
20:43 - Candeeiro Hall turned on --> Sonoff turned on
20:43 - Pedro got home has been triggered --> Automation
20:43 - tracker changed to home --> Based on Owntracks
20:43 - Pedro ET is at home --> I get home

And then, the next morning, the following sequence of event happened:
11:29 - tracker changed to not_home
11:29 - Pedro ET is away
09:29 - Luzes turned off
09:29 - Candeeiro Hall turned off --> I woke up and turned it off
08:25 - Luzes turned on
08:25- Candeeiro Hall turned on -->It turned on all by itself…
08:07 - yr Symbol changed to 1
07:34 - Sun has risen
06:07 - yr Symbol changed to 3
03:07 - yr Symbol changed to 1
01:07 - yr Symbol changed to 3

I can’t really understand what’s happening…can someone point in the right direction?

I have a similar issue. I have 8 Sonoff Basic flashed with Tasmota firmware. Most are connected to the various lamps I have throughout the house. Most, but not every morning 3 of the 8 are on, and when i look at my HA screen they have switched on about 2 hours prior to me getting up. I would love to know what is turning them on, is it HA or MQTT. I followed Dr Zzzs tutorial on soldering a resistor and a capacitor to the IO pins of the So off, but no luck. I’m thinking of replacing the 3 of them with new Sonoff’s. Any suggestions would of what could be causing this would be appreciated before I replace them.