Possible to use input_number value in a call_service node?

Hi,

I am fairly new to nodered and wonder if this is possible:
I have a basic motion-based light flow: on when motion detected, off when no motion detected for X minutes. Works great.

However, I want to change it so that the brightness level is determined by the value of an input_number that can be manually or automatically manipulated.

But, I can’t seem to figure out a way to get a dynamic brightness value when calling the service node to toggle on the light. I think it is possible, but I am not sure what to look for or how to google it?

Does anyone have a suggestion?

You would use a current state node to get a value of an entity from Home Assistant. Use it before the call-service node and then use its payload in the call-service data property

{
    brightness: "{{payload}}"
}

ah, that makes sense. I was thinking that I would somehow need to retrieve the value of the input_number inside the call_service node… I’ll give that a go, thanks!