For different reasons I want HomeAssistant to integrate with my LIFX devices only via NodeRed (node-red-contrib-node-lifx (node) - Node-RED). So far I have installed both HA/NodeRed companion and node-red-contrib-node-lifx.
I have also managed to created a button in HA that via NodeRed turns on one of my lamps.
Now my questions is how can I create a flow that lets NodeRed expose my lifx device as a light in HomeAssistant?
FWIW I’ve used the HA integration for years and had no real issues with it. That node hasn’t been updated in over 5 years. Recently there has been been updates to nodered that have caused problems in old nodes, that’s something you should consider as well.
Edit: The update problems are applicable to the HA addon. If you run nodered separately, you can control the module versions to avoid problem seen in the addon version.
I would use the manual mqtt. That is only because I’ve already done it a number of times and I’m most familiar with that method. Not because I see a specific advantage.
That is not really applicable to HA. I assume that the lifx nodes provide a JSON output when changes are made to the light. Connect that directly to an mqtt out node and choose a topic for the light.
In configuration.yaml add your mqtt entity and use the path you chose for the light.
To access the different parts of json, you start wit value_json and then the json path. If I wanted the timestamp, value_json.timestamp or the type value_json.type etc
Tip in vs code you can right click and choose generate uuid to get a value for the unique id. The unique id enables editing the entities setting from ha.