Skip to content

Commit 4d3726b

Browse files
committed
Clean up commented-out code
1 parent cdb2022 commit 4d3726b

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

plugwise/helper.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,11 +1346,6 @@ def _get_toggle_state(
13461346
if (state := xml.find(locator)) is not None:
13471347
data["switches"][name] = state.text == "on"
13481348
self._count += 1
1349-
# # Remove the cooling_enabled binary_sensor when the corresponding switch is present
1350-
# # Except for Elga
1351-
# if toggle == "cooling_enabled" and not self._elga:
1352-
# data["binary_sensors"].pop("cooling_enabled")
1353-
# self._count -= 1
13541349

13551350
def _get_plugwise_notifications(self) -> None:
13561351
"""Collect the Plugwise notifications."""

tests/test_init.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,6 @@ async def setup_legacy_app(
135135
"""Create mock webserver for Smile to interface with."""
136136
app = aiohttp.web.Application()
137137

138-
# if fail_auth:
139-
# app.router.add_get("/{tail:.*}", self.smile_fail_auth)
140-
# app.router.add_route("PUT", "/{tail:.*}", self.smile_fail_auth)
141-
# return app
142-
143138
app.router.add_get("/core/appliances", self.smile_appliances)
144139
app.router.add_get("/core/domain_objects", self.smile_domain_objects)
145140
app.router.add_get("/core/modules", self.smile_modules)
@@ -474,16 +469,6 @@ async def connect_legacy_wrapper(
474469
self, raise_timeout=False, fail_auth=False, stretch=False
475470
):
476471
"""Wrap connect to try negative testing before positive testing."""
477-
# if fail_auth:
478-
# try:
479-
# _LOGGER.warning("Connecting to device with invalid credentials:")
480-
# await self.connect_legacy(fail_auth=fail_auth)
481-
# _LOGGER.error(" - invalid credentials not handled") # pragma: no cover
482-
# raise self.ConnectError # pragma: no cover
483-
# except pw_exceptions.InvalidAuthentication as exc:
484-
# _LOGGER.info(" + successfully aborted on credentials missing.")
485-
# raise pw_exceptions.InvalidAuthentication from exc
486-
487472
if raise_timeout:
488473
_LOGGER.warning("Connecting to device exceeding timeout in handling:")
489474
return await self.connect_legacy(raise_timeout=True)

0 commit comments

Comments
 (0)