Hi,
I have a lot of plant sensors (Xiaomi BLE). Since a while they often show as not available and I can see that there was simply no update for a few hours. After a while they show up with a new value and then later they fall back to not available. Seems as if HomeAssistant thinks the devices are gone as those sensors simply don’t report new values very often but I also really don’t need them to update more than once a day. I rather have long battery life.
I found this pull request which seems to address exactly this issue: Automatically determine the advertising interval for bluetooth devices by bdraco · Pull Request #79669 · home-assistant/core · GitHub (Automatically determine the advertising interval for bluetooth devices). I also see that the pull request was merged. But I can’t seem to find information on in which HomeAssistant version this landed. Was this change already released or not?
Do you have good BT coverage?
When first adding some plant sensors we had pretty much the same experience as you describe. Thought it was just the sensors.
However when we scattered some BT proxy’s around the house, we noticed the plant sensors updating on average anywhere between 5-55 mins with not a single drop out.
I currently have my plant sensors setup both in ESPhome directly, and back to HA via the ESPhome Bluetooth Proxy as a test. It does seem like running them back to HA via proxy has them ‘unavailable’ a fair bit whereas the entities that are setup in ESPhome directly stay ‘available’.
I’m not sure if this is just because ESPhome is buffering the entities and then updating the values as they come in. I’m guessing so.
I would have thought that HA should not make the proxied sensors go ‘unavailable’ simply because a value update hasn’t come in for a while… seems to be happening though.
I simply have them auto discovered via BT straight out the box (no ESPhome) with multiple BT Proxies for good coverage and don’t have a single dropout / unavailable on any of them.
I take it these are ESPhome though?
Yes, sorry. They are ESPHome on M5Stack’s.
Some sensors are certainly quite a bit away from my HA host. But they still send values once in a while. And I really do not need an update every hour. I am happy if they don’t even try to send so often - they might do and it just doesn’t make it through, but I wouldn’t be sad if they don’t as that just saves battery. I can see values for the sensors that show as unavailable from several hours ago usually which would totally be enough for me. I was most curious if that pull request that I mentioned in my original post was already integrated in HA as it seemed to be dealing with exactly that “don’t show sensors as unavailable only because they haven’t send an update in some hours”.