-
I am facing the next problem. With ESP I want to control cwww LED with 5 buttons (on/off, increase and decrease brightness, increase and decrease color temperature(CT)). While the brightness can be easily controlled with the -light.dim_relative:relative_brightness command, there is no command to change the CT - e.g. to lower it by 50 K when the button is pressed. I tried to solve this problem by storing the current CT in golobal variable and then updating it when the color temperature changes with lambda function call.set_color_temperature(id(global_color_temperature)). This works fine until I change the CT with the app. Then the golobal variable is not updated and when I change the brightness again via ESP, it quickly jumps to the last value stored in the golbal variable... I am new to home automation, so is there something I am missing here? A command to retrieve current CT (using YAML or Lambda) would solve a lot of problems, since I would not have to resort to the global variable. An even better solution would be a function similar to light.dim_relative which would allow us to change the CT in increments, say for 50K. Thank you very much for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You can get the current settings with a lambda. They are in the |
Beta Was this translation helpful? Give feedback.
You can get the current settings with a lambda. They are in the
.remote_values
instance variable. You can find details in the apiref link at the bottom of the light docs.