Hello,
I come to you because I can’t find how to program what I want to do.
My goal is to control 8 light circuits in a dimmable way using an esp32 connected to this card to make it simple. as well as 8 push buttons.
What I would like to program is that when I press my button: - for example <1 second it turns the light on or off
If I hold it down, it gradually increases the brightness.
I managed to program the two separately, but I can’t put these two functions together
Ho OK, But as said in my post I know how to do it, in fact I followed the documentation. What I can’t program is the two functions at the same time.
Namely, Single presses to turn on or off and long presses to vary the intensity of the light.
When I try to integrate the two I always have problems, either the ON/OFF no longer works, or the dimmer part no longer works correctly
For example my last attempt.
Below, the short press does not really work when turning on, it considers that it is an on_press. If I keep it pressed it varies well, and if I press it short when already on it turns off well.
Try using on_multi_click to specify what click timings correspond to different actions. This allows you to guarantee that the different click timings are mutually exclusive so the on_click and on_press actions don’t simultaneously fire.
It is customary to assign the solution tag to the post which actually provided a solution, so that others with the same issue might find it immediately.
In this case, it is obvious that Daniel’s post right above yours offers a complete solution, while your post with the current solution tag just says it worked.
Could you kindly assign a proper solution tag to the post just above yours?