Lights that turn on randomly after a Home Assistant, Kajplats, and Sonoff setup is built are usually telling you there is instability below the scene layer. Do not keep adding automations until you know whether the problem is radio coverage, a controller crash, a duplicated trigger, or devices dropping from Matter.
Isolate the failure
- Disable automations temporarily and confirm whether the lights still turn on by themselves.
- Check Home Assistant logs around the moment all Matter devices disappear.
- Move the Sonoff coordinator away from USB 3 noise and routers, ideally on a short USB extension.
- Confirm every switch or button has only one binding or automation path for the same lights.
- Power-cycle one piece at a time so you can identify whether the controller, dongle, or bulbs are the common failure point.
Use Rhythm after the base layer is quiet
Rhythm works best when the underlying light path is predictable. Once the Kajplats bulbs remain online and commands are no longer duplicated, add the room to Rhythm for normal brightness, color-temperature, and Sleep behavior instead of using scattered emergency fixes as your daily lighting system.