sorry Zero999 Im still a caveman
I was looking for a product but couldn't find anything so I decided to build it,
The pin out is on the first page of the data sheet.
You've missed the points about the unused op-amp and supply decoupling.
An unused op-amp can sometimes become unstable if left with the inputs unconnected, as you've shown. Pins 6 and 7 need to be connected togeter and pin 2 should go to pin 4.
A capacitor should be connected, across the power supply pins: 8 and 4, so provide a stable, low impedance power supply voltage for the op-amp.
One problem with op-amps and indeed other elecronic circuits is, it might work on the bench, even if improperly designed, yet be unreliable in the long term, so it's better to get it right first time.
so what is the projekt?
The project integrates an old analog 1-10V dimmer with Home Assistant to automate desk lighting. A Wemos D1 Pro controls the dimming via an MCP4725 DAC, but since the DAC only outputs up to 5V, an LM358 op-amp is used to boost the signal to 10V. An LDR measures natural light and adjusts the lamp's brightness for optimal lighting. A 5V relay module is used to control the 230V power to the lamp. The goal is to maintain ideal lighting based on ambient conditions and with the integration to Home Assistant, my zigbee remote controls can now also control the lamp.
It is a pain you need an op-amp and 12V power supply. There are lamp controllers which will work with PWM input, or a variable resistor.