4
53
277
论坛分享达人
script: - id: apply_dimming # https://esphome.io/guides/automations.html#script-execute-action then: - lambda: |- auto call = id(dimmer_Light2).turn_on(); call.set_brightness(id(val_lv)/100); call.set_color_temperature(id(val_tc)); call.perform();
使用道具 举报
40
3016
1万
超级版主
Nero
float r = id(rgb_ligth).current_values.get_red(); float g = id(rgb_ligth).current_values.get_green(); float b = id(rgb_ligth).current_values.get_blue(); float brightness = id(rgb_ligth).current_values.get_brightness();
https://github.com/smarthomefans/esphome-template/blob/master/dimmer_light/esp32_dimmer_light.yaml https://www.esphome.io/api/classesphome_1_1light_1_1_light_color_values.html
0
20
89
注册会员
本版积分规则 发表回复 回帖后跳转到最后一页
Archiver|手机版|小黑屋|Hassbian ( 晋ICP备17001384号-1 )
GMT+8, 2025-5-14 19:53 , Processed in 0.159367 second(s), 23 queries .
Powered by Discuz! X3.5
© 2001-2025 Discuz! Team.