Skip to content

Commit d700822

Browse files
committed
Change debug levels
1 parent 226008a commit d700822

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

plugwise_usb/nodes/circle.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ async def clock_synchronize(self) -> bool:
893893
if abs(clock_offset.total_seconds()) < MAX_TIME_DRIFT:
894894
return True
895895

896-
_LOGGER.warning(
896+
_LOGGER.info(
897897
"Sync clock of node %s because time drifted %s seconds",
898898
self._mac_in_str,
899899
int(abs(clock_offset.total_seconds())),
@@ -911,7 +911,7 @@ async def clock_synchronize(self) -> bool:
911911
)
912912
if (node_response := await set_request.send()) is not None:
913913
return node_response.ack_id == NodeResponseType.CLOCK_ACCEPTED
914-
_LOGGER.debug("Failed to sync the clock of %s", self.name)
914+
_LOGGER.warning("Failed to sync the clock of %s", self.name)
915915
return False
916916

917917
async def load(self) -> None:
@@ -1346,7 +1346,7 @@ async def energy_reset_request(self) -> None:
13461346
f"Unexpected NodeResponseType {response.ack_id!r} received as response to CircleClockSetRequest"
13471347
)
13481348

1349-
_LOGGER.warning("Energy reset for Node %s successful", self._mac_in_str)
1349+
_LOGGER.info("Energy reset for Node %s successful", self._mac_in_str)
13501350

13511351
# Follow up by an energy-intervals (re)set
13521352
interval_request = CircleMeasureIntervalRequest(
@@ -1365,20 +1365,20 @@ async def energy_reset_request(self) -> None:
13651365
raise MessageError(
13661366
f"Unknown NodeResponseType '{interval_response.response_type.name}' received"
13671367
)
1368-
_LOGGER.warning("Resetting energy intervals to default (= consumption only)")
1368+
_LOGGER.info("Resetting energy intervals to default (= consumption only)")
13691369

13701370
# Clear the cached energy_collection
13711371
if self._cache_enabled:
13721372
self._set_cache(CACHE_ENERGY_COLLECTION, "")
1373-
_LOGGER.warning(
1373+
_LOGGER.info(
13741374
"Energy-collection cache cleared successfully, updating cache for %s",
13751375
self._mac_in_str,
13761376
)
13771377
await self.save_cache()
13781378

13791379
# Clear PulseCollection._logs
13801380
self._energy_counters.reset_pulse_collection()
1381-
_LOGGER.warning("Resetting pulse-collection")
1381+
_LOGGER.info("Resetting pulse-collection")
13821382

13831383
# Request a NodeInfo update
13841384
if await self.node_info_update() is None:
@@ -1387,7 +1387,7 @@ async def energy_reset_request(self) -> None:
13871387
self._mac_in_str,
13881388
)
13891389
else:
1390-
_LOGGER.warning(
1390+
_LOGGER.info(
13911391
"Node info update after energy-reset successful for %s",
13921392
self._mac_in_str,
13931393
)

plugwise_usb/nodes/circle_plus.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ async def clock_synchronize(self) -> bool:
6969
"""Synchronize realtime clock. Returns true if successful."""
7070
request = CirclePlusRealTimeClockGetRequest(self._send, self._mac_in_bytes)
7171
if (response := await request.send()) is None:
72-
_LOGGER.debug(
72+
_LOGGER.warning(
7373
"No response for clock_synchronize() for %s", self._mac_in_str
7474
)
7575
await self._available_update_state(False)
@@ -89,7 +89,7 @@ async def clock_synchronize(self) -> bool:
8989
tzinfo=UTC,
9090
)
9191
if dt_now_date != response_date:
92-
_LOGGER.warning(
92+
_LOGGER.info(
9393
"Sync clock of node %s because time has drifted %s days",
9494
self._mac_in_str,
9595
int(abs((dt_now_date - response_date).days)),
@@ -107,7 +107,7 @@ async def clock_synchronize(self) -> bool:
107107
if abs(clock_offset.total_seconds()) < MAX_TIME_DRIFT:
108108
return True
109109

110-
_LOGGER.warning(
110+
_LOGGER.info(
111111
"Sync clock of node %s because time drifted %s seconds",
112112
self._mac_in_str,
113113
int(abs(clock_offset.total_seconds())),
@@ -121,7 +121,7 @@ async def _send_clock_set_req(self) -> bool:
121121
)
122122
if (node_response := await set_request.send()) is not None:
123123
return node_response.ack_id == NodeResponseType.CLOCK_ACCEPTED
124-
_LOGGER.debug("Failed to sync the clock of %s", self.name)
124+
_LOGGER.warning("Failed to sync the clock of %s", self.name)
125125
return False
126126

127127
@raise_not_loaded

0 commit comments

Comments
 (0)