Skip to content

Commit bee2264

Browse files
committed
Corrections
1 parent e023ce5 commit bee2264

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

plugwise/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from plugwise.constants import (
88
DEFAULT_LEGACY_TIMEOUT,
99
DEFAULT_PORT,
10+
DEFAULT_TIMEOUT,
1011
DEFAULT_USERNAME,
1112
DOMAIN_OBJECTS,
1213
LOGGER,
@@ -128,6 +129,7 @@ async def connect(self) -> bool:
128129
self._smile_api = SmileAPI(
129130
self._host,
130131
self._passwd,
132+
self._timeout,
131133
self._websession,
132134
self._cooling_present,
133135
self._elga,
@@ -147,10 +149,10 @@ async def connect(self) -> bool:
147149
self.smile_type,
148150
self._user,
149151
self._port,
150-
self._timeout,
151152
) if not self.smile_legacy else SmileLegacyAPI(
152153
self._host,
153154
self._passwd,
155+
self._timeout,
154156
self._websession,
155157
self._is_thermostat,
156158
self._on_off_device,
@@ -168,7 +170,6 @@ async def connect(self) -> bool:
168170
self.smile_zigbee_mac_address,
169171
self._user,
170172
self._port,
171-
self._timeout,
172173
)
173174

174175
# Update all endpoints on first connect

plugwise/legacy/smile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def __init__(
4040
self,
4141
host: str,
4242
password: str,
43+
timeout: float,
4344
websession: aiohttp.ClientSession,
4445
_is_thermostat: bool,
4546
_on_off_device: bool,
@@ -57,7 +58,6 @@ def __init__(
5758
smile_zigbee_mac_address: str | None,
5859
username: str = DEFAULT_USERNAME,
5960
port: int = DEFAULT_PORT,
60-
timeout: float,
6161
) -> None:
6262
"""Set the constructor for this class."""
6363
super().__init__(

plugwise/smile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def __init__(
4646
self,
4747
host: str,
4848
password: str,
49+
timeout: float,
4950
websession: aiohttp.ClientSession,
5051
_cooling_present: bool,
5152
_elga: bool,
@@ -65,7 +66,6 @@ def __init__(
6566
smile_type: str,
6667
username: str = DEFAULT_USERNAME,
6768
port: int = DEFAULT_PORT,
68-
timeout: float,
6969
) -> None:
7070
"""Set the constructor for this class."""
7171
super().__init__(

0 commit comments

Comments
 (0)