My sister owns two of these garden lights with large orb shaped platic containers around them. With a switch they can be set to 'white' light or 'changing colors' setting. One of them is malfunctioning.

This is the top with the solar array, a tiny circuit board with the white and colorchanging LEDs and a three-way switch.

IMG_20230426_075317665

Here is the bottom of the tiny circuit board:

IMG_20230426_081816330

The inside of the device:

bottom

Other side of the main circuit board:

IMG_20230426_081825398

And the bottom of the main circuit board:

pcb

Note: The switch is somewhat hard to understand. There are three states: One is where poles 1-2 and 4-5 (looking at the photo of the circuit board, not the schematic) are connected, middle is when nothing is connected and the other is where poles 5-6 and 2-3 are connected.

I think that translates to this circuit which somewhat resembles those on the YX8018 datasheet:

image-20230426112819278

Note: The YX8018 symbol is not by default in the KiCad library, I added it myself.