Skip to content

Commit b7a1e13

Browse files
committed
More improvements 2
1 parent 35ee5ee commit b7a1e13

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

plugwise_usb/network/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ async def node_join_available_message(self, response: PlugwiseResponse) -> bool:
263263
raise NodeError(f"Unable to add Node ({mac}): {exc}") from exc
264264
if result:
265265
return True
266-
266+
267267
return False
268268

269269
async def node_rejoin_message(self, response: PlugwiseResponse) -> bool:
@@ -286,7 +286,7 @@ async def node_rejoin_message(self, response: PlugwiseResponse) -> bool:
286286
else:
287287
_LOGGER.debug("duplicate awake discovery for %s", mac)
288288
return True
289-
289+
290290
return False
291291

292292
def _unsubscribe_to_protocol_events(self) -> None:
@@ -299,7 +299,7 @@ def _unsubscribe_to_protocol_events(self) -> None:
299299
self._unsubscribe_stick_event = None
300300

301301
# endregion
302-
302+
303303
# region - Coordinator
304304
async def discover_network_coordinator(self, load: bool = False) -> bool:
305305
"""Discover the Zigbee network coordinator (Circle+/Stealth+)."""

plugwise_usb/nodes/helpers/pulses.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def update_pulse_counter(
271271
self, pulses_consumed: int, pulses_produced: int, timestamp: datetime
272272
) -> None:
273273
"""Update pulse counter.
274-
274+
275275
Both device consumption and production counters reset after the beginning of a new hour.
276276
"""
277277
self._cons_pulsecounter_reset = False
@@ -287,7 +287,7 @@ def update_pulse_counter(
287287

288288
if (
289289
self._pulses_production is not None
290-
and self._pulses_production < pulses_produced
290+
and self._pulses_production < pulses_produced
291291
):
292292
self._prod_pulsecounter_reset = True
293293
_LOGGER.debug("update_pulse_counter | production pulses reset")
@@ -313,9 +313,9 @@ def update_pulse_counter(
313313

314314
def _update_rollover(self) -> None:
315315
"""Update rollover states.
316-
316+
317317
When the last found timestamp is outside the interval `_last_log_timestamp`
318-
to `_next_log_timestamp` the pulses should not be counted as part of the
318+
to `_next_log_timestamp` the pulses should not be counted as part of the
319319
ongoing collection-interval.
320320
"""
321321
if self._log_addresses_missing is not None and self._log_addresses_missing:
@@ -341,7 +341,7 @@ def _detect_rollover(
341341
next_log_timestamp: datetime | None,
342342
is_consumption=True,
343343
) -> bool:
344-
"""Helper function for _update_rollover()."""
344+
"""Detect rollover based on timestamp comparisons."""
345345

346346
if (
347347
self._pulses_timestamp is not None

0 commit comments

Comments
 (0)