diff --git a/deebotozmo/ecovacs_mqtt.py b/deebotozmo/ecovacs_mqtt.py index 770c779..29c52dd 100644 --- a/deebotozmo/ecovacs_mqtt.py +++ b/deebotozmo/ecovacs_mqtt.py @@ -1,9 +1,10 @@ import json import logging import ssl +from typing import MutableMapping + from gmqtt import Client from gmqtt.mqtt.constants import MQTTv311 -from typing import MutableMapping from deebotozmo.models import Vacuum, RequestAuth from deebotozmo.vacuum_bot import VacuumBot @@ -46,7 +47,7 @@ async def _on_message(client, topic: str, payload: bytes, qos, properties) -> in await bot.handle(topic_split[2], data, False) return _ON_MESSAGE_RETURN_SUCCESS except Exception as err: - _LOGGER.error("An exception occurred", err) + _LOGGER.error("An exception occurred", err, exc_info=True) self._client.on_message = _on_message self._client.set_auth_credentials(auth.user_id, auth.token) diff --git a/deebotozmo/map.py b/deebotozmo/map.py index ed616d7..5152a6c 100644 --- a/deebotozmo/map.py +++ b/deebotozmo/map.py @@ -142,7 +142,7 @@ async def _handle_cached_map_info(self, event_data: dict, requested: bool): if requested: await self._execute_command(GetMapSet(map_id)) except Exception as e: - _LOGGER.debug("[_handle_cached_map] Exception thrown", e) + _LOGGER.debug("[_handle_cached_map] Exception thrown", e, exc_info=True) _LOGGER.warning("[_handle_cached_map] MapID not found -- did you finish your first auto cleaning?") async def _handle_map_set(self, event_data: dict, requested: bool): diff --git a/deebotozmo/vacuum_bot.py b/deebotozmo/vacuum_bot.py index c040739..8e6d3dd 100644 --- a/deebotozmo/vacuum_bot.py +++ b/deebotozmo/vacuum_bot.py @@ -240,7 +240,7 @@ async def _handle_battery(self, event_data: dict): try: self.batteryEvents.notify(BatteryEvent(event_data["value"])) except ValueError: - _LOGGER.warning(f"couldn't parse battery status: {event_data}") + _LOGGER.warning(f"Couldn't parse battery status: {event_data}") async def _handle_charge_state_requested(self, event_body: dict): if event_body["code"] == 0: