File tree Expand file tree Collapse file tree 3 files changed +6
-36
lines changed
Expand file tree Collapse file tree 3 files changed +6
-36
lines changed Original file line number Diff line number Diff line change @@ -51,19 +51,15 @@ def __init__(
5151 username : str = DEFAULT_USERNAME ,
5252 ) -> None :
5353 """Set the constructor for this class."""
54- self ._host = host
55- self ._password = password
56- self ._port = port
54+
5755 self ._timeout = DEFAULT_LEGACY_TIMEOUT
58- self ._username = username
59- self ._websession = websession
6056 super ().__init__ (
61- self . _host ,
62- self . _password ,
63- self . _port ,
57+ host ,
58+ password ,
59+ port ,
6460 self ._timeout ,
65- self . _username ,
66- self . _websession ,
61+ username ,
62+ websession ,
6763 )
6864
6965 self ._cooling_present = False
@@ -128,10 +124,7 @@ async def connect(self) -> Version | None:
128124
129125 self ._smile_api = (
130126 SmileAPI (
131- self ._host ,
132- self ._password ,
133127 self ._request ,
134- self ._websession ,
135128 self ._cooling_present ,
136129 self ._elga ,
137130 self ._is_thermostat ,
@@ -150,15 +143,10 @@ async def connect(self) -> Version | None:
150143 self .smile_name ,
151144 self .smile_type ,
152145 self .smile_version ,
153- self ._port ,
154- self ._username ,
155146 )
156147 if not self .smile_legacy
157148 else SmileLegacyAPI (
158- self ._host ,
159- self ._password ,
160149 self ._request ,
161- self ._websession ,
162150 self ._is_thermostat ,
163151 self ._loc_data ,
164152 self ._on_off_device ,
@@ -173,8 +161,6 @@ async def connect(self) -> Version | None:
173161 self .smile_name ,
174162 self .smile_type ,
175163 self .smile_zigbee_mac_address ,
176- self ._port ,
177- self ._username ,
178164 )
179165 )
180166
Original file line number Diff line number Diff line change 1111
1212from plugwise .constants import (
1313 APPLIANCES ,
14- DEFAULT_PORT ,
15- DEFAULT_USERNAME ,
1614 DOMAIN_OBJECTS ,
1715 LOCATIONS ,
1816 LOGGER ,
2826from plugwise .exceptions import ConnectionFailedError , DataMissingError , PlugwiseError
2927from plugwise .legacy .data import SmileLegacyData
3028
31- import aiohttp
3229from munch import Munch
3330from packaging .version import Version
3431
@@ -40,10 +37,7 @@ class SmileLegacyAPI(SmileLegacyData):
4037
4138 def __init__ (
4239 self ,
43- host : str ,
44- password : str ,
4540 request : Callable [..., Awaitable [Any ]],
46- websession : aiohttp .ClientSession ,
4741 _is_thermostat : bool ,
4842 _loc_data : dict [str , ThermoLoc ],
4943 _on_off_device : bool ,
@@ -58,8 +52,6 @@ def __init__(
5852 smile_name : str ,
5953 smile_type : str ,
6054 smile_zigbee_mac_address : str | None ,
61- port : int = DEFAULT_PORT ,
62- username : str = DEFAULT_USERNAME ,
6355 ) -> None :
6456 """Set the constructor for this class."""
6557 self ._cooling_present = False
Original file line number Diff line number Diff line change 1313 ADAM ,
1414 ANNA ,
1515 APPLIANCES ,
16- DEFAULT_PORT ,
17- DEFAULT_USERNAME ,
1816 DOMAIN_OBJECTS ,
1917 GATEWAY_REBOOT ,
2018 LOCATIONS ,
3129from plugwise .data import SmileData
3230from plugwise .exceptions import ConnectionFailedError , DataMissingError , PlugwiseError
3331
34- import aiohttp
3532from defusedxml import ElementTree as etree
3633
3734# Dict as class
@@ -46,10 +43,7 @@ class SmileAPI(SmileData):
4643
4744 def __init__ (
4845 self ,
49- host : str ,
50- password : str ,
5146 request : Callable [..., Awaitable [Any ]],
52- websession : aiohttp .ClientSession ,
5347 _cooling_present : bool ,
5448 _elga : bool ,
5549 _is_thermostat : bool ,
@@ -68,8 +62,6 @@ def __init__(
6862 smile_name : str ,
6963 smile_type : str ,
7064 smile_version : Version | None ,
71- port : int = DEFAULT_PORT ,
72- username : str = DEFAULT_USERNAME ,
7365 ) -> None :
7466 """Set the constructor for this class."""
7567 self ._cooling_enabled = False
You can’t perform that action at this time.
0 commit comments