From 4a26e3a8efb71172619655d34da82431e8d5c5c9 Mon Sep 17 00:00:00 2001 From: G Johansson Date: Tue, 4 Oct 2022 17:53:06 +0200 Subject: [PATCH] Reduce warnings in log --- custom_components/sector/coordinator.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/custom_components/sector/coordinator.py b/custom_components/sector/coordinator.py index eebb24b..452a545 100644 --- a/custom_components/sector/coordinator.py +++ b/custom_components/sector/coordinator.py @@ -235,7 +235,7 @@ async def _async_update_data(self) -> dict[str, Any]: API_URL + "/Panel/GetPanelStatus?panelId={}".format(panel_id) ) if not response_get_status or not isinstance(response_get_status, dict): - LOGGER.warning("Could not retrieve status for panel %s", panel_id) + LOGGER.debug("Could not retrieve status for panel %s", panel_id) else: LOGGER.debug("Retrieved Panel status %s", response_get_status) data[key]["online"] = response_get_status.get("IsOnline") @@ -249,9 +249,7 @@ async def _async_update_data(self) -> dict[str, Any]: API_URL + "/Panel/GetTemperatures?panelId={}".format(panel_id) ) if not response_temp: - LOGGER.warning( - "Could not retrieve temp data for panel %s", panel_id - ) + LOGGER.debug("Could not retrieve temp data for panel %s", panel_id) else: LOGGER.debug("Temps refreshed: %s", response_temp) for temp in response_temp: @@ -266,9 +264,7 @@ async def _async_update_data(self) -> dict[str, Any]: API_URL + "/Panel/GetLockStatus?panelId={}".format(panel_id) ) if not response_lock: - LOGGER.warning( - "Could not retrieve lock data for panel %s", panel_id - ) + LOGGER.debug("Could not retrieve lock data for panel %s", panel_id) else: LOGGER.debug("Locks refreshed: %s", response_lock) for lock in response_lock: @@ -281,7 +277,7 @@ async def _async_update_data(self) -> dict[str, Any]: API_URL + "/Panel/GetSmartplugStatus?panelId={}".format(panel_id) ) if not response_switch: - LOGGER.warning( + LOGGER.debug( "Could not retrieve switch data for panel %s", panel_id ) else: @@ -297,7 +293,7 @@ async def _async_update_data(self) -> dict[str, Any]: API_URL + "/Panel/GetLogs?panelId={}".format(panel_id) ) if not response_logs: - LOGGER.warning("Could not retrieve logs for panel %s", panel_id) + LOGGER.debug("Could not retrieve logs for panel %s", panel_id) else: LOGGER.debug("Logs refreshed: %s", response_logs) user_to_set: str | None = None