return empty bytes object vs None on exception

This commit is contained in:
SupaFlav committed 2023-09-01 09:51:57 -04:00
1 parent 32cfc34c37
commit d38c30011c
1 file changed
+3
@@ -293,6 +293,9 @@ class PollingCoordinator(DataUpdateCoordinator):
self.logger.warning( self.logger.warning(
"Needed to disconnect due to error: %s (This can also be the case if you used device controls)", err "Needed to disconnect due to error: %s (This can also be the case if you used device controls)", err
) )
# caught an exception, return empty bytes object
return bytes()
def _notification_handler(self, _sender: int, data: bytearray): def _notification_handler(self, _sender: int, data: bytearray):
"""Handle bt data.""" """Handle bt data."""