Sonoff SNZB-02P temperature sensors often unavailable

I’m relatively new to this, so may have a schoolboy error. I’m a database software programmer, so I have skills in that area.

I have a number of Sonoff SNZB-02P temperature / humidity sensors scattered around the house (and a couple of smart plugs to help extend Zigbee range)

One of them seems to toggle available / unavailable on a relatively long period. ChatGPT suggests it might have a SLEEP or battery-saving setting (I’m not aware that I have fiddled with any settings).

Others seems to register temperature reliably, varying through the day as I would expect, and then suddenly stop doing that (my assumption is that they become “unavailable”), and then start providing data again.

I found a few topics about this, but not many, and no obvious solutions. Comments tended to be “They are cheap” rather than anything concrete.

If this is the “norm” I would have expected to see more posts about it - presumably folk are actually relying on reasonably worthwhile temperature data to control things?

I need something which will reliably provide a temperature reading “regularly”. House temperature changes slowly, so “instant reporting” not required, per se.

Is this “unreliability” common for this type of sensors?

Can I spend-more-money and guarantee a better solution?

Or some other approach to improve robustness? Lots (how many is that?) or Zigbee repeaters maybe?

One approach I have spent a bit of time on is to try to use a program to detect any toggle between “Available/Unavailable”, in order to see when this happens. My thinking is that the graphs in HA are not a good indicator, because they seem to maintain temperature-assumption after the device becomes unavailable, I would like data to “not exist” and “No assumption made” when a device is unavailable - so that at least I could see when that was happening.

Some threads I’ve looked at:

Example of several sensors

Orange - reasonably reliable, but was goofy around 15-Apr

Dark blue - drops in and out at regular intervals (and I don’t trust the “straight line” bit

Pink - started off OK … absent for several days, suddenly resumed

Yellow - starts off OK, now showing constant temperature (I am presuming that the actual is “Unavailable”)

Green - mostly good, some daps, some obvious “flat line” untrustworthy sections too

Purple - a gap on 15-Apr, but I don’t believe temperature does not change at all!

And a higher-res if needed

I just installed a SNZB-02P and it was very intermittent until I bent the battery contact springs to make better contact.

I also had intermittent reporting after fixing the battery contact issue which for me was due to the 02P stubbornly attaching to a far away router. By repairing with the ZHA set to pair with a specific router that fixed it.

Until I did a firmware update, then it ran back to a far router, but it is staying put again after another directed repair.

What do you mean by “a couple”?

When it comes to Zigbee, you want to have at absolute, bare minimum one router in each room and one in each hallway… and if you have small rooms and/or dense walls you may need 2x or more than that to get a decent mesh.