I pieced together the bits of configs mentioned above for an ESPHome Tuya dimmer with min/max of 15%/100%, and it mostly worked. However the dimmer value of the template light didn’t update in Home Assistant when I adjusted the dimmer level on the device itself. So I needed to add a reverse mapping in level_template (which was suggested before, but for value_template, which I think is a typo?). Anyway, here’s a full working config:
I’m wondering how to get the remapping working with an RGBWW light-component. I’m using a Texas Instrument TLC59208F Output component for controlling LED-strip. The nature of this 94Khz PWM signal causes non-linearity. Below 15% brightess is basically lights off.
I tried to add examples to output and light component but ESPHome complains about non-existing type. Do I need to configure 5 of these template outputs because using RBGWW? Where to find properties like “value_template” and “level_template”. Can’t find in search. Help is appreciated!
[EDIT]
Larger snippet with context of platform:output would be helpful.
I think a feature request would be a good thing. I can image how many are out there that want light brightness scale remapping.
I managed through automations to deal with low brightness levels, which the LED lamps still easily handles once they are turned on, by shortly putting the lamps at their threshold level they need to actually get going and light up, and set them back to the previous lower level using a scene.create service.
But with automations it is not possible to limit the scale on te low end in a good manner, because once you set the light below the low threshold at which it actually will turn off, the automation that would prevent this is too late.
Some feature request about this subject that I had found:
You can define min_power: 30% in the output component to remap the brightness range of light between 30-100%. Home Assistant frontend will consider 30% as 0%. This can be achieved when using a RobotDyn AC dimmer.
here’s my ESPHome monochromatic light dimmer configuration:
I was looking for the same thing, meaning I wanted to scale my LED lamp because it starts at 22% DC. So I found this thread.
And yes, one might use home assistant template sensors but I’d rather have it done in the ESP32. I think the hint of @koencomposer is very helpful and showed me the way to go:
I was facing a similar issue with a 0-10v dimmer where the light would turn off at 22%. I tried using templates but then I discovered the HA HACS integrations lightener. Releases · fredck/lightener (github.com). It’s all done via the GUI. I set the Brightnes mapping as such.