Skip to content

Commit 1d4e5aa

Browse files
committed
Add missing mac function-property
1 parent 215fdbe commit 1d4e5aa

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

plugwise_usb/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,10 @@ async def set_accept_join_request(self, state: bool) -> bool:
210210
raise NodeError(f"Failed setting accept joining: {exc}") from exc
211211
return True
212212

213-
async def set_measure_interval(self, cons: int, prod: int) -> bool:
213+
async def set_measure_interval(self, mac: str, cons: int, prod: int) -> bool:
214214
"""Configure the measurement interval settings."""
215215
try:
216-
await self._network.set_measure_interval(cons, prod)
216+
await self._network.set_measure_interval(mac, cons, prod)
217217
except NodeError as exc:
218218
raise NodeError(f"{exc}")
219219
return True

plugwise_usb/network/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,15 +541,17 @@ async def allow_join_requests(self, state: bool) -> None:
541541
_LOGGER.debug("Sent AllowJoiningRequest to Circle+ with state=%s", state)
542542
self.accept_join_request = state
543543

544-
async def set_measure_interval(self, consumption: int, production: int) -> None:
544+
async def set_measure_interval(
545+
self, mac: str, consumption: int, production: int
546+
) -> None:
545547
"""Set the measure intervals for both consumption and production.
546548
547549
Default: consumption = 60, production = 0.
548550
For measuring in both directions set both to 60.
549551
"""
550552
_LOGGER.debug("set_measure_interval | cons=%s, prod=%s", consumption, production)
551553
request = CircleMeasureIntervalRequest(
552-
self._controller.send, consumption, production
554+
self._controller.send, mac, consumption, production
553555
)
554556
if (response := await request.send()) is None:
555557
raise NodeError("No response for CircleMeasureIntervalRequest.")

0 commit comments

Comments
 (0)