Skip to content

Commit 65fcd47

Browse files
committed
Indicate PRODUCERS, use to set _log_production
1 parent 117adcc commit 65fcd47

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plugwise_usb/nodes/helpers/pulses.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
_LOGGER = logging.getLogger(__name__)
1414
CONSUMED: Final = True
1515
PRODUCED: Final = False
16+
PODUCERS: tuple[str] = ("000D6F00029C32C7")
1617

1718
MAX_LOG_HOURS = WEEK_IN_HOURS
1819

@@ -88,11 +89,14 @@ def __init__(self, mac: str) -> None:
8889

8990
self._logs: dict[int, dict[int, PulseLogRecord]] | None = None
9091
self._log_addresses_missing: list[int] | None = None
91-
self._log_production = True # : bool | None = None
9292
self._pulses_consumption: int | None = None
9393
self._pulses_production: int | None = None
9494
self._pulses_timestamp: datetime | None = None
9595

96+
self._log_production = False # : bool | None = None
97+
if mac in PRODUCERS:
98+
self._log_production = False
99+
96100
@property
97101
def collected_logs(self) -> int:
98102
"""Total collected logs."""

0 commit comments

Comments
 (0)