i hava a light fysicly that use , ant the brightnes i control it via rs232.
i can make a flow in nodered , ant control it via my serial port ( light on , off , brighness , status , etc) .
Best way is to make a light template in home assistant and have it feed nodered.
HA light entity > filter so nothing happens if state doesn’t change > node red logic for lighting control > delay > HA light entity
There will be some fiddling involved and it’s a little bit more complex than it seems to get it working exactly the way you want but essentially this allows things to enter the loop in node red then set the light in HA and it allows HA to set the light.
I will try to dig up an example flow from a project that does this. In the meantime, sounds like you will need to figure out how to play with templates in HA. It’s a super powerful feature.
HA and nodered can really work well together when used correctly. They both have their strengths. I’m surprised there aren’t more users floating between both.