Trying to control PWM fan using ESP8266, it works but the duty cycle output does not correspond to the requested duty cycles. Example: Send 50%, ESP receives 50%, fan turns slowly, however looking at the output on oscilloscope the duty cycle is about 10% , fan returns 300 rpm. Has anyone seen this before?
its a Arctic F9 PWM PC fan. However even with the fan disconnected that wave is the same.
dropping the frequency down to 100hz has the same effect, 50% is not 50% duty cycle. Oddly the fan can still be controlled at 100hz, so much for the 21-28khz spec.
I think this may be it, although I believe it applies to all lights. After trawling the ESPHome source, I think you may need to include gamma_correct: 1.0 in your light section.
As far as I can see, the default 2.8 value is being applied to your 50% as an exponent, giving 14% duty cycle. The relevant function is currently line 74 of this file. ESPHome reference is here.