Ok. I thought I had probably posted the key parts but I may have missed something; here is complete YAML.
This is driving WWCW Led Strips in 2 sets. One for each side of wardrobe, and these are linked to reed switches to determine if the door is open. It appears to work apart from PWM, and thus any dimming or tuning of colours.
Switched lights on with door open. Seems to work fine.
[20:02:00][D][binary_sensor:037]: 'Wardrobe Right Sensor': Sending state ON
[20:02:00][D][light.state:418]: 'Master Wardrobe Right Light' Turning ON
[20:02:07][D][binary_sensor:037]: 'Wardrobe Right Sensor': Sending state OFF
[20:02:07][D][light.state:418]: 'Master Wardrobe Right Light' Turning OFF
Turning on with brightness at 34%, nothing happens.
Adjusting Colour temperature, nothing happens
Pure Warm White or Pure Cold White, works
100% Brightness, works
It seems to me that the PWM isn’t working, looks to be receiving the commands from HA but then nothing.
[20:03:17][D][light.state:418]: 'Master Wardrobe Right Light' Turning ON
[20:03:17][D][light.state:425]: Brightness: 34%
[20:03:36][D][light.state:418]: 'Master Wardrobe Right Light' Turning ON
[20:03:36][D][light.state:438]: Color Temperature: 343.0 mireds
[20:03:38][D][light.state:418]: 'Master Wardrobe Right Light' Turning ON
[20:03:38][D][light.state:425]: Brightness: 63%
[20:03:41][D][light.state:418]: 'Master Wardrobe Right Light' Turning ON
[20:03:41][D][light.state:425]: Brightness: 100%
[20:03:45][D][light.state:418]: 'Master Wardrobe Right Light' Turning ON
[20:03:45][D][light.state:438]: Color Temperature: 454.0 mireds
[20:03:48][D][light.state:418]: 'Master Wardrobe Right Light' Turning ON
[20:03:48][D][light.state:438]: Color Temperature: 238.0 mireds
[20:04:12][D][light.state:418]: 'Master Wardrobe Right Light' Turning ON
[20:04:12][D][light.state:438]: Color Temperature: 454.0 mireds
[20:04:22][D][light.state:418]: 'Master Wardrobe Right Light' Turning ON
[20:04:22][D][light.state:425]: Brightness: 40%
[20:04:33][D][light.state:418]: 'Master Wardrobe Right Light' Turning ON
[20:04:33][D][light.state:425]: Brightness: 0%
[20:04:43][D][light.state:418]: 'Master Wardrobe Right Light' Turning OFF
I can’t get either CWWW strip connected to dim or colour tune.
One Strip is connected to W1 & W2, the other G & B.
The RGB connected strips elsewhere in the house works perfectly. I have tried swapping the CWWW light to an RGB one but still dimming doesn’t work. I would say it was a hardware fault if it didn’t work perfectly when ESPurna is flashed to it.
Sounds like a rounding issue somewhere or a config value missing
Looking at the code with the phone I can see it uses the color temperature and gamma settings to calculate the pwm output. A detailed log might need to be activated. Try changing log level to VERY_VERBOSE and try to be lucky. Otherwise we would have to add more logging with your configuración.
I am committed to get this running for you.
Also check the output of esphome config
I’m not so familiar with the hass.io add on.
But the idea is that esphome code generator will output the configuration it reads from your yaml file
This output looks very much like your yaml file but it is generated from what esphome readed from it.
My first post was about RGB strip I have in kitchen which now seem to work.
The detailed full yaml and logs I posted cover cwww I have used in wardrobe which still don’t work.
Also I would assume that setting them as rgb or cwww lights would only affect the front end as still using pwm to dim led. Might be a little odd but dimming should still work and colour wheel would replace temp but should still allow adjustment.
After setting logging to VERY_VERBOSE I somehow screwed up and the board was in a boot loop. Took it apart and reflashed using UART.
Currently running with VERBOSE, haven’t risked setting VERY_VERBOSE. I suspect I was just unlucky.
The dimming works fine, the colour temperature tuning less so; I seem to get Cold White LEDs on till I hit mid point, both at mid point and WW on other side. I was hoping for a smoother transition but maybe this is just a limitation?
I may resort to just using two lights per strip and dim each to desire pwm setting to get required temperatures for now.
Generally been rather odd, perhaps issues with my build environment? I’m running it via hassio and docker so would assume it is ok.
Not sure if this will work for you, but I flashed my tasmota (rgbw) to esphome and had same issue,
The colors was always 100% or off, the transitions did not work.
I tested different configs and settings but nothing made it work.
But when I pulled the power to the whole module and then reconnected it, it started to work as expected, transitions (default 1s) started to work, and I could dim the lights down to 1 % if I wanted.
It is probably something in the hardware module that gets “cached” or something.
So try to pull the power completely off (No software restart) then reconnect it.