As the topic says.
One other device, the same config does show this problem. I did try to enable “Use ping for status” in ESPHome Device Builder config
But it does not help. Any suggestions?
@Karosm:
Ping returns: Destination host unreachable.
And MQTT says sensor is Unavailable.
But ESPhome says Online after about 5min the sensor was turned off.
When I checked 3 hours later Esphome says Offline.
How much time expected between Ping: "Destination host unreachable. " and
Esphome reporting : Offline?
I do not know what the timeout is, but you need to consider that some devices might be battery powered and in sleep mode, which means they might not reply to ping, but still be “alive”, just not awake, and can should therefore maybe not be marked as offline.
If you look at the Z-Wave, Zigbee and Thread integrations, then they typically have two timeouts.
One for mains powered devices that are usually minutes or maybe hours (mains powered devices can sleep too or there can just be momentary network issues) and another one for battery powered devices that are several hours long.
I do not think ESPHome have this distinction, so both situations might have to be covered in one timeout value.
Yes, It was considered, as I have multiple devices that configured for sleep and behave as you described. Still I thought the “Ping for status” should return host unreachable and switch status in Esphome to Offline? Also I see inconsistency in two sensors that run the same yaml (of course naming and all that is different).