Skip to content

Commit 8d52da0

Browse files
committed
Remove duplicate send()
1 parent 3558155 commit 8d52da0

File tree

3 files changed

+0
-5
lines changed

3 files changed

+0
-5
lines changed

plugwise_usb/network/registry.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ async def retrieve_network_registration(
144144
) -> tuple[int, str] | None:
145145
"""Return the network mac registration of specified address."""
146146
request = CirclePlusScanRequest(self._send_to_controller, self._mac_nc, address)
147-
response: CirclePlusScanResponse | None = await request.send()
148147
if (response := await request.send()) is None:
149148
if retry:
150149
return await self.retrieve_network_registration(address, retry=False)

plugwise_usb/nodes/circle.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ async def calibration_update(self) -> bool:
184184
self._mac_in_str,
185185
)
186186
request = EnergyCalibrationRequest(self._send, self._mac_in_bytes)
187-
calibration_response = await request.send()
188187
if (calibration_response := await request.send()) is None:
189188
_LOGGER.warning(
190189
"Retrieving energy calibration information for %s failed",
@@ -493,7 +492,6 @@ async def energy_log_update(self, address: int | None) -> bool:
493492
self.name,
494493
)
495494
request = CircleEnergyLogsRequest(self._send, self._mac_in_bytes, address)
496-
response = await request.send()
497495
if (response := await request.send()) is None:
498496
_LOGGER.debug(
499497
"Retrieving of energy log at address %s for node %s failed",

plugwise_usb/nodes/circle_plus.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ async def clock_synchronize(self) -> bool:
8383
clock_request = CirclePlusRealTimeClockGetRequest(
8484
self._send, self._mac_in_bytes
8585
)
86-
clock_response = await clock_request.send()
8786
if (clock_response := await clock_request.send()) is None:
8887
_LOGGER.debug(
8988
"No response for async_realtime_clock_synchronize() for %s", self.mac
@@ -113,7 +112,6 @@ async def clock_synchronize(self) -> bool:
113112
clock_set_request = CirclePlusRealTimeClockSetRequest(
114113
self._send, self._mac_in_bytes, datetime.now(tz=UTC)
115114
)
116-
node_response = await clock_set_request.send()
117115
if (node_response := await clock_set_request.send()) is not None:
118116
return node_response.ack_id == NodeResponseType.CLOCK_ACCEPTED
119117
_LOGGER.warning(

0 commit comments

Comments
 (0)