Sounds great! Look forward to your feedback:)
Do you have a RF remote paired to the dimmer?
As you may be aware, the dimmer enters in RF Pairing mode as soon as it is powered on. If you get power outage and when power is restore, it can cause the dimmer to get paired with a random RF signal that my be present at that time (e.g. your neighbour using a remote to open his gate!) and then the light will switch on at any time the same RF signal is received.
Solution is to clear RF pairing on your remote and pair again.
Check my comment below regarding ghost switching
About the Ghost Switching.
Till today I got no solution for this issue accept disconnect the RF chip by interrupting the line to the espressif chip.
The newer D1 versions still have the same issues
Sorry for the inconvenience.
Please contact SONOFF for support.
I already did contact SonOff but deleting RF controller (de-pairing) did not help.
This is a known issue that can not be solved through software, only if you modify the dimmer by destroy the PCB track that goes from the RF chip to the Espressif chip you can get rid of those Ghost Switching.
Of course you will loose the ability to control the D1 dimmer with the RF remote.