Node red to entity in homeassistant

in node red , i created a serial port node that recieves data.

now i want to create an entity that Homeassistant wil discover automaticly from node-red to HA
before i create a topic in this forum , i ask chatGPT some advice.

but the ‘entity node’ is old .
what can i use to be futureproof ?

chatGPT told me to use :

Use a Sensor Entity Node: In Node-RED, you can use the "ha-entity-config" node to configure and create a sensor entity in Home Assistant. This node allows you to define the entity ID, name, icon, and other attributes of the sensor.
Configure the Payload in the Sensor Entity Node: In the "ha-entity-config" node, you can configure the payload to populate the sensor's state. This can be done by setting the msg.payload property to the desired value or by extracting the relevant data from the incoming payload.
Deploy the Flow: Once you have configured the sensor entity node and set up the payload, deploy the Node-RED flow to apply the changes and create the sensor in Home Assistant.

Use a sensor node. Which if you have Node-Red installed properly is immediately below the depreciated entity node, I’m not sure how you could miss it.

And I don’t recommend chatGPT as a source of info for HA - it’s accuracy rate is pretty low.

hello , thx for your reply.

and already a new problem , when i use a sensor node .
i have this problem now : ** Attention: This node requires Node-RED custom integration version 1.1.0+ to be installed in Home Assistant for it to function**

That is available as HACS integration. The installation instructions are on the page you linked.

1 Like

I’m using a sensor node (two actually) in a flow and it’s suddenly showing up as “unavailable” in HA.

Getting the following error:

“This entity is no longer being provided by the nodered integration. If the entity is no longer in use, delete it in settings.”

Any suggestions? I’ve updated everything (companion app, etc) and restarted Proxmox to no avail. Tried creating a new sensor (NR Test Sensor). Has worked flawlessly for over a year. It seems to have gone wonky very recently, most likely after an upgrade but I’m not sure.

image