Hello all,
I have a Philips hue button that I have integrated into Node Red and I want to convert the dimming values into a number.
With a debug node I get the following values:
with a short button press I can switch on and off without problems.
with long keypress / hold I always get only brightness_step_up or brightness_step_down.
But I need a number to be able to use it on the slider.
Can someone help with this or had someone already integrated the hue button?
"incrementBrightness" (int / boolean): Specifies by how many percent the light should be made brighter or true to make the light brighter in 10% steps|
"decrementBrightness" (int / boolean): Specifies the percentage by which the light should be made darker or true to make the light darker in 10% steps|
Thats a parameter of the lamp in case its also a hue. If its a different brand, you have to look which parameter it uses. The slider itself should be changed by the output of the lamp.
From interest ist the device, which you want to control with the slider. If you only want to control the slider itself, you have to make your own routine, which has to store the actual value and you add/substract a specific value from this with each action. After that you can forward the new value to the slider and store this value as actual value.
I want to use the button but I also want to use the slider on a display.
I would like to control the light with the button but also see the change on the display.
There is no "current value". There is only brightness up/down, when you hold it, it will perform a stepsize action_step_size: 30. The button itself is agnostic as you can hold it forever.
So you either request the current brightness of the device that you want to control or you control the range manually.
The ikea dimmers work in a similar way, although they also show when you release the button. I cannot find your button on the zigbee2mqtt site, but there it should explain what it exposes to mqtt.
Hello,
thank you for your answer.
So this is not possible as I imagine?
The button always sends 7x step up and then 7x step down.
It must be possible to convert this into a function, but maybe it works with the step size... There the device sends at the beginning a 56 and then 6x 30
I installed Zigbee2Mqtt on the PI and then learned the button via a Sonoff dongle.
I would need a function that distinguishes between brightness_step_up and down and then increases the values accordingly (the first time always by 56 and then 6x by 30).