Hi!
I’m converting my Xiomi Philips Zhirui Downlight to use ESPHome. It uses WROOM-02 chip and I 2x PWM channels to control the colors (cold and warm white). The light is working fine, I can set the brightness and color temperature in HA without any problem. The only thing that I need is to setup the minimum brightness. Is that possible?
For instance, in HA entity item, the minium brightness to turn the light ‘on’ should be 45% of the slider. I mean, anything below 45%, the light is off…so 45% on HA slider should be 0% actually.
I have tryied to apply “min_power” to PWM outputs (individually), but this didn’t worked, since it affect the temperature directly. If I set min_power to 0.45 for channel “A”, when I switch the colors, the channel A color stay ‘on’ at minimum level (which shouldn’t). So I guess I can’t use min_power for individual channels.
Any tip?
This is my current working code:
substitutions:
hostname: 'xiaomilight'
esphome:
name: $hostname
platform: ESP8266
board: esp_wroom_02
board_flash_mode: dout
#includes:
# - xiaomi_light.h
web_server:
port: 80
wifi:
#domain: '.lan'
networks:
- ssid: 'Skynet'
password: 'XXXXXX'
manual_ip:
static_ip: 192.168.22.62
gateway: 192.168.22.1
subnet: 255.255.255.0
logger:
level: DEBUG
esp8266_store_log_strings_in_flash: False
api:
ota:
output:
- platform: esp8266_pwm
pin: GPIO12
frequency: 5000 Hz
id: out_cw
- platform: esp8266_pwm
pin: GPIO15
frequency: 5000 Hz
id: out_b
light:
- platform: cwww
name: "Livingroom Lights"
cold_white: out_cw
warm_white: out_b
cold_white_color_temperature: 6536 K
warm_white_color_temperature: 2000 K
constant_brightness: true