Creating virtual dimmer in Node-RED

Hi there

first of all happy new year to the community. I try to creat a virtual dimmer in Node-RED. The goal is that the output of a dimmer (brightness) controls a LED controller. Lets say I turn on the dimmer physically and the brightness is 20, then the LED controller should turn on at 20 brightness as well.

entities
physical dimmer called: light.dimmable_light_1
RGBW LED controller called: light.shelly_shrgbw2_00e0f1_3

I have a basic knowledge of Node-RED but cant get it to work. Here are the debug-infos from the light.dimmable_light_1.
3


In my understanding Node-RED should read the brightness value (from the new_state), extract the brightness (probably via change-node) and hand it over to a call-service node.

Would appreciate any help to get this thing working, its just for a test of a special setup :wink:

Kind regards

Andrew

No need for the change node.
In the data field of the call service node place this:

{
    "brightness": msg.data.new_state.attributes.brightness
}

1 Like

many thanks for the fast reply! works like a charm :wink: