Hello dear Node-Red Community,
I would like to dim some LED strips using a philips hue button. The whole thing is connected via zigbee2mqtt.
about the button:
short button press = ON or OFF
long button press = STEP UP or STEP DOWN
I have already created a flow in node red.
the dimming also works, but the long keystroke always outputs the command ON, so that the switching on and off does not work properly.
It would be nice if with short keystroke OFF = off / ON = last dimming level.
Perhaps the button is also unsuitable for this.
Has anyone implemented this differently and could help me here?
What sort of button are you talking about? A physical button? A dashboard button?
The standard dashboard button only triggers an action on (I think) release, not an action on press and another on release. If you search the forum you will probably find examples of how to do what you want. Maybe search for long button press for example.
I think I got it right.
Now I have only one problem. I would still like to switch the light on and off via a switch in the dashboard.
If the slider value is for example greater than 0 then the switch should jump to ON.
If I have the light on for example 80% and set the switch to OFF, the light should turn off. When I switch the switch back to ON the value should still be at 80.