Creating new NR Home Assistant sensor leaves it in "unavailable" state

I’ve used NR and the sensor entity for the last five or so years. I’m configuring it the same way I’ve done it hundreds of times before, but now it won’t work anymore. I’ve iterated through different variants, checked logs, reboots etc etc. Can’t find any info on the net.

Everything is fully updated. The old sensors I already use are working.

I don’t know when it stopped working because I’ve not tried to create a new sensor since about July 26’.

Does it work for You?

Yes it does.

All the very latest versions

Version: 0.82.0

Home Assistant version: 2026.10.4
Companion version: 4.3.2

Node-RED version: 5.0.9
Docker: yes
Add-on: 22.2.1

Node.js version: v24.22.1 arm64 linux
OS: Linux 6.18.58-haos arm64

Added a new Sensor node, with configuration node. Registers the new entity sensor, and updates.

Are you aware of the new ‘availability’ setting?

Whether the Home Assistant entity is available. By default, every update sends available as true. On creation, or after a Home Assistant restart without Resend, the entity starts unavailable until availability is set again.
If availability comes from a message, flow, global, or expression, and that value is missing, it is not sent and Home Assistant leaves availability unchanged. In that case, set availability again after a Home Assistant or Node-RED restart or the entity will remain unavailable.

Availability, apparently, defaults to true, but clearly if availability gets turned off then the entity becomes unavailable, just like a standard integration-entity in HA.

This applies only to Sensor and Binary Sensor, and was added at HA WebSocket 0.81.0 so only last month. It also seems to require an update to the NR Companion (which manages all NR entities).

Prompted by your post I have only just found this new feature. Testing on my dev machine, and with ‘availability’ set to constant true it seems that restarting Home Assistant now starts with the sensor as ‘unavailable’, since Node-RED has not (yet) been prompted to update the entity. Just like any other integration, the sensor will be unavailable until the integration (in this case Node-RED) sends an update of the entity state to HA.

There is a simple ‘fix’, and the setting “Resend state, attributes, and available” inside the entity configuration node to on (defaults to ‘off’) does indeed cause NR to resend the current state and availability flag, from NR to HA, when HA restarts.

I suspect that we now need to remember to turn ‘Resend’ on for all configuration nodes, unless you actually wish to directly manage availability from within the flow when HA restarts…

Before:

After:

Edit:

As I have two Home Assistants, I was able to test the behaviour of this new feature, based on different versions of the HA WebSocket Nodes and the Node Red Companion.

The new field option “Availability” only exists in the Sensor Node in Home Assistant WebSocket from v0.81.0 onwards. From this point, the availability is set by the node rather than as ‘always available’ by default, so to make sensor entities available immediately after an HA or NR restart, we need to either trigger a state change in the node (with availability true), or use the “Resend” option in the configuration node.

Here is the fun part [I think that I have got this correct, apologies if not].

If you have the new version of the Node-RED Companion (HA integration) then this expects the availability to be presented by the Sensor Node at each update, rather than assuming ‘available’ by default. With the old version of the WebSocket nodes, there is no way to issue the ‘available’ flag with the entity state update, and therefore the HA entity remains unavailable always.

I have been able to replicate your issue, by using an old version of Node-RED WebSocket Nodes, creating a new Sensor (without the “availability” field) and connecting this to an updated Home Assistant which is running the latest Node-RED Companion.

The answer, as is so often the case, is to update both the HA WebSocket nodes and the Node-RED Companion to match each other.

Thanks a million Geoff,
for your thorough explanation of the problem!

I checked my versions against yours and they matched up perfectly. Was uncertain of the Companion so I redownloaded it and rebooted. There was no update to be done in the Palette so I figure I already had the right one. Still no go - I tried everything I tried before posting once again.

As I was feeling really stupid I got thinking about what you wrote about “Resend”. I was testing with a new “Sensor”, how could there be something to resend? So I sent a payload to an “unavailable” “Sensor” thinking this is so unintuitive it’ll never work. I was wrong (as usual). So thank you again for getting me on the right track!!!

Yes it needs a bit of mulling over.

As far as I understand this, formally all NR created sensor entities were set as available by default at each HA / NR restart. Unless you had the Resend option set, the sensor would be “unknown” until the node sends a new state update.

Now the availability is set individually by the node. At restart, all NR sensors will be “unavailable”, rather than “unknown”. The first state update not only sets the state, but now also the availability.

Small difference really, but there is an issue if using the latest Companion with an older version of the Websocket Nodes.