When I send state : ON to the state topic the light on the car goes on. How can I get the dimmer to match the current % if it was set elsewhere? Does the State topic accept 0-255 and then reflect that on the dimmer without changing the light?
I’m using JSON for reference. All of the manipulation is done in node red so I should be able to do anything required. If Node red changes I light I would like the brightness it set to reflect on HA’s card.
It integrates node red and home assistant, so you can (in your example) set node red to turn the light on to 50% brightness, so that would work for any light entity, not just a mqtt light.
the flow should be:
1 NR sets set (or similar) topic in mqtt, including brightness etc
2 the device executed this command
3. the device sets its current state and attributes into its status topic in mqtt
4. HA updates its state from mentioned status topic
So answering your initial question, yes, it should work as you are assuming.
As @nickrout mentioned, using HA integrated NR, you can call light services. resulting setting lights entities in HA, which in turn sets required topic in mqtt in order to execute the action on destination device.
However there might be some operation featured by your device which are not supported by HA light service. So in some cases it’s better to communicate directly through mqtt