Skip to content

Commit

Permalink
Merge pull request #127 from gjohansson-ST/reduce_logging
Browse files Browse the repository at this point in the history
Reduce warnings in log
  • Loading branch information
gjohansson-ST authored Oct 4, 2022
2 parents ddc36d9 + 4a26e3a commit 2a0e69f
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions custom_components/sector/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 2a0e69f

Please sign in to comment.