If the device is offline / switch off / could not be found - Log Error - handle it?

Many device not all the time online or accessible.
What is the best way, to handle this, the log dont go full ?

Example:

BleakError: A device with address 34:XX:54:XX:84:XX could not be found.
11:53:31 AM – (WARNING) Delonghi Primadonna (custom integration) - message first occurred at 11:15:01 AM and shows up 155 times

“155 times” in 5 Minutes
or is that okay?

You could set it to continue on error while you buy something that’s not so unreliable.

If you actually want these devices to be powered off occasionally, you have two options:

  • Exclude them from logging (see Recorder)
  • Increase their logging level to “error” (see Logger)

Integrations are not supposed to log continuous “can’t connect errors” per the Home Assistant developer guidelines.

Open an issue with the custom integration repo requesting a change to meet these guidelines.

1 Like

It may not be the fault of the integration itself - some devices are designed to be always on and disappear if they’re powered off.

Sonos speakers are a case in point. I have several Play:1 speakers which are always on standby - they don’t have a power button. If one is unplugged it will be lost from the Sonos app itself, and consequently from HA. Occasionally it will not be detected by the Sonos app even when it is powered on again, resulting in a mess of errors from the Sonos and Media Player integrations.

thanks, i open here a Issue