plugwise 1.4.4__tar.gz → 1.5.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. {plugwise-1.4.4 → plugwise-1.5.1}/PKG-INFO +1 -1
  2. {plugwise-1.4.4 → plugwise-1.5.1}/plugwise/__init__.py +20 -16
  3. {plugwise-1.4.4 → plugwise-1.5.1}/plugwise/constants.py +14 -14
  4. {plugwise-1.4.4 → plugwise-1.5.1}/plugwise/data.py +6 -6
  5. {plugwise-1.4.4 → plugwise-1.5.1}/plugwise/helper.py +51 -58
  6. {plugwise-1.4.4 → plugwise-1.5.1}/plugwise/legacy/data.py +3 -3
  7. {plugwise-1.4.4 → plugwise-1.5.1}/plugwise/util.py +2 -4
  8. {plugwise-1.4.4 → plugwise-1.5.1}/plugwise.egg-info/PKG-INFO +1 -1
  9. {plugwise-1.4.4 → plugwise-1.5.1}/pyproject.toml +2 -2
  10. {plugwise-1.4.4 → plugwise-1.5.1}/tests/test_init.py +3 -5
  11. {plugwise-1.4.4 → plugwise-1.5.1}/LICENSE +0 -0
  12. {plugwise-1.4.4 → plugwise-1.5.1}/README.md +0 -0
  13. {plugwise-1.4.4 → plugwise-1.5.1}/plugwise/common.py +0 -0
  14. {plugwise-1.4.4 → plugwise-1.5.1}/plugwise/exceptions.py +0 -0
  15. {plugwise-1.4.4 → plugwise-1.5.1}/plugwise/legacy/helper.py +0 -0
  16. {plugwise-1.4.4 → plugwise-1.5.1}/plugwise/legacy/smile.py +0 -0
  17. {plugwise-1.4.4 → plugwise-1.5.1}/plugwise/py.typed +0 -0
  18. {plugwise-1.4.4 → plugwise-1.5.1}/plugwise/smile.py +0 -0
  19. {plugwise-1.4.4 → plugwise-1.5.1}/plugwise.egg-info/SOURCES.txt +0 -0
  20. {plugwise-1.4.4 → plugwise-1.5.1}/plugwise.egg-info/dependency_links.txt +0 -0
  21. {plugwise-1.4.4 → plugwise-1.5.1}/plugwise.egg-info/requires.txt +0 -0
  22. {plugwise-1.4.4 → plugwise-1.5.1}/plugwise.egg-info/top_level.txt +0 -0
  23. {plugwise-1.4.4 → plugwise-1.5.1}/setup.cfg +0 -0
  24. {plugwise-1.4.4 → plugwise-1.5.1}/setup.py +0 -0
  25. {plugwise-1.4.4 → plugwise-1.5.1}/tests/test_adam.py +0 -0
  26. {plugwise-1.4.4 → plugwise-1.5.1}/tests/test_anna.py +0 -0
  27. {plugwise-1.4.4 → plugwise-1.5.1}/tests/test_generic.py +0 -0
  28. {plugwise-1.4.4 → plugwise-1.5.1}/tests/test_legacy_anna.py +0 -0
  29. {plugwise-1.4.4 → plugwise-1.5.1}/tests/test_legacy_generic.py +0 -0
  30. {plugwise-1.4.4 → plugwise-1.5.1}/tests/test_legacy_p1.py +0 -0
  31. {plugwise-1.4.4 → plugwise-1.5.1}/tests/test_legacy_stretch.py +0 -0
  32. {plugwise-1.4.4 → plugwise-1.5.1}/tests/test_p1.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: plugwise
3
- Version: 1.4.4
3
+ Version: 1.5.1
4
4
  Summary: Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3.
5
5
  Home-page: https://github.com/plugwise/python-plugwise
6
6
  Author: Plugwise device owners
@@ -5,7 +5,9 @@ Plugwise backend module for Home Assistant Core.
5
5
  from __future__ import annotations
6
6
 
7
7
  from plugwise.constants import (
8
+ DEFAULT_LEGACY_TIMEOUT,
8
9
  DEFAULT_PORT,
10
+ DEFAULT_TIMEOUT,
9
11
  DEFAULT_USERNAME,
10
12
  DOMAIN_OBJECTS,
11
13
  LOGGER,
@@ -43,26 +45,25 @@ class Smile(SmileComm):
43
45
  self,
44
46
  host: str,
45
47
  password: str,
46
- timeout: int,
47
48
  websession: aiohttp.ClientSession,
48
49
  port: int = DEFAULT_PORT,
49
50
  username: str = DEFAULT_USERNAME,
50
51
  ) -> None:
51
52
  """Set the constructor for this class."""
52
- super().__init__(
53
- host,
54
- password,
55
- port,
56
- timeout,
57
- username,
58
- websession,
59
- )
60
-
61
53
  self._host = host
62
- self._passwd = password
54
+ self._password = password
63
55
  self._port = port
64
- self._user = username
56
+ self._timeout = DEFAULT_LEGACY_TIMEOUT
57
+ self._username = username
65
58
  self._websession = websession
59
+ super().__init__(
60
+ self._host,
61
+ self._password,
62
+ self._port,
63
+ self._timeout,
64
+ self._username,
65
+ self._websession,
66
+ )
66
67
 
67
68
  self._cooling_present = False
68
69
  self._elga = False
@@ -126,7 +127,7 @@ class Smile(SmileComm):
126
127
 
127
128
  self._smile_api = SmileAPI(
128
129
  self._host,
129
- self._passwd,
130
+ self._password,
130
131
  self._request,
131
132
  self._websession,
132
133
  self._cooling_present,
@@ -147,10 +148,10 @@ class Smile(SmileComm):
147
148
  self.smile_name,
148
149
  self.smile_type,
149
150
  self._port,
150
- self._user,
151
+ self._username,
151
152
  ) if not self.smile_legacy else SmileLegacyAPI(
152
153
  self._host,
153
- self._passwd,
154
+ self._password,
154
155
  self._request,
155
156
  self._websession,
156
157
  self._is_thermostat,
@@ -168,7 +169,7 @@ class Smile(SmileComm):
168
169
  self.smile_type,
169
170
  self.smile_zigbee_mac_address,
170
171
  self._port,
171
- self._user,
172
+ self._username,
172
173
  )
173
174
 
174
175
  # Update all endpoints on first connect
@@ -212,6 +213,9 @@ class Smile(SmileComm):
212
213
  )
213
214
  raise UnsupportedDeviceError
214
215
 
216
+ if not self.smile_legacy:
217
+ self._timeout = DEFAULT_TIMEOUT
218
+
215
219
  if self._target_smile in ("smile_open_therm_v2", "smile_thermo_v3"):
216
220
  LOGGER.error(
217
221
  "Your Smile identified as %s needs a firmware update as it's firmware is severely outdated",
@@ -123,7 +123,7 @@ P1_LEGACY_MEASUREMENTS: Final[dict[str, UOM]] = {
123
123
  # radiator_valve: 'uncorrected_temperature', 'temperature_offset'
124
124
 
125
125
  DEVICE_MEASUREMENTS: Final[dict[str, DATA | UOM]] = {
126
- "humidity": UOM(PERCENTAGE), # Specific for a Jip
126
+ "humidity": UOM(NONE), # Specific for a Jip
127
127
  "illuminance": UOM(UNIT_LUMEN), # Specific for an Anna
128
128
  "temperature": UOM(TEMP_CELSIUS), # HA Core thermostat current_temperature
129
129
  "thermostat": DATA("setpoint", TEMP_CELSIUS), # HA Core thermostat setpoint
@@ -425,7 +425,7 @@ class SmileBinarySensors(TypedDict, total=False):
425
425
  class SmileSensors(TypedDict, total=False):
426
426
  """Smile Sensors class."""
427
427
 
428
- battery: float
428
+ battery: int
429
429
  cooling_activation_outdoor_temperature: float
430
430
  cooling_deactivation_threshold: float
431
431
  dhw_temperature: float
@@ -434,11 +434,11 @@ class SmileSensors(TypedDict, total=False):
434
434
  electricity_consumed: float
435
435
  electricity_consumed_interval: float
436
436
  electricity_consumed_off_peak_cumulative: float
437
- electricity_consumed_off_peak_interval: int
438
- electricity_consumed_off_peak_point: int
437
+ electricity_consumed_off_peak_interval: float
438
+ electricity_consumed_off_peak_point: float
439
439
  electricity_consumed_peak_cumulative: float
440
- electricity_consumed_peak_interval: int
441
- electricity_consumed_peak_point: int
440
+ electricity_consumed_peak_interval: float
441
+ electricity_consumed_peak_point: float
442
442
  electricity_consumed_point: float
443
443
  electricity_phase_one_consumed: float
444
444
  electricity_phase_two_consumed: float
@@ -449,20 +449,20 @@ class SmileSensors(TypedDict, total=False):
449
449
  electricity_produced: float
450
450
  electricity_produced_interval: float
451
451
  electricity_produced_off_peak_cumulative: float
452
- electricity_produced_off_peak_interval: int
453
- electricity_produced_off_peak_point: int
452
+ electricity_produced_off_peak_interval: float
453
+ electricity_produced_off_peak_point: float
454
454
  electricity_produced_peak_cumulative: float
455
- electricity_produced_peak_interval: int
456
- electricity_produced_peak_point: int
455
+ electricity_produced_peak_interval: float
456
+ electricity_produced_peak_point: float
457
457
  electricity_produced_point: float
458
458
  gas_consumed_cumulative: float
459
459
  gas_consumed_interval: float
460
460
  humidity: float
461
461
  illuminance: float
462
462
  intended_boiler_temperature: float
463
- modulation_level: float
463
+ modulation_level: int
464
464
  net_electricity_cumulative: float
465
- net_electricity_point: int
465
+ net_electricity_point: float
466
466
  outdoor_air_temperature: float
467
467
  outdoor_temperature: float
468
468
  return_temperature: float
@@ -470,7 +470,7 @@ class SmileSensors(TypedDict, total=False):
470
470
  setpoint_high: float
471
471
  setpoint_low: float
472
472
  temperature_difference: float
473
- valve_position: float
473
+ valve_position: int
474
474
  voltage_phase_one: float
475
475
  voltage_phase_two: float
476
476
  voltage_phase_three: float
@@ -552,7 +552,7 @@ class DeviceData(TypedDict, total=False):
552
552
  last_used: str | None
553
553
  select_schedule: str
554
554
 
555
- mode: str
555
+ climate_mode: str
556
556
  # Extra for Adam Master Thermostats
557
557
  control_state: str | bool
558
558
 
@@ -240,16 +240,16 @@ class SmileData(SmileHelper):
240
240
  data["select_schedule"] = sel_schedule
241
241
  self._count += 2
242
242
 
243
- # Operation modes: auto, heat, heat_cool, cool and off
244
- data["mode"] = "auto"
243
+ # Set HA climate HVACMode: auto, heat, heat_cool, cool and off
244
+ data["climate_mode"] = "auto"
245
245
  self._count += 1
246
246
  if sel_schedule in (NONE, OFF):
247
- data["mode"] = "heat"
247
+ data["climate_mode"] = "heat"
248
248
  if self._cooling_present:
249
- data["mode"] = "cool" if self.check_reg_mode("cooling") else "heat_cool"
249
+ data["climate_mode"] = "cool" if self.check_reg_mode("cooling") else "heat_cool"
250
250
 
251
251
  if self.check_reg_mode("off"):
252
- data["mode"] = "off"
252
+ data["climate_mode"] = "off"
253
253
 
254
254
  if NONE not in avail_schedules:
255
255
  self._get_schedule_states_with_off(
@@ -273,7 +273,7 @@ class SmileData(SmileHelper):
273
273
  loc_schedule_states: dict[str, str] = {}
274
274
  for schedule in schedules:
275
275
  loc_schedule_states[schedule] = "off"
276
- if schedule == selected and data["mode"] == "auto":
276
+ if schedule == selected and data["climate_mode"] == "auto":
277
277
  loc_schedule_states[schedule] = "on"
278
278
  self._schedule_old_states[location] = loc_schedule_states
279
279
 
@@ -100,7 +100,6 @@ class SmileComm:
100
100
 
101
101
  self._auth = BasicAuth(username, password=password)
102
102
  self._endpoint = f"http://{host}:{str(port)}"
103
- self._timeout = timeout
104
103
 
105
104
  async def _request(
106
105
  self,
@@ -270,6 +269,10 @@ class SmileHelper(SmileCommon):
270
269
  for appliance in self._domain_objects.findall("./appliance"):
271
270
  appl = Munch()
272
271
  appl.pwclass = appliance.find("type").text
272
+ # Don't collect data for the OpenThermGateway appliance
273
+ if appl.pwclass == "open_therm_gateway":
274
+ continue
275
+
273
276
  # Extend device_class name of Plugs (Plugwise and Aqara) - Pw-Beta Issue #739
274
277
  description = appliance.find("description").text
275
278
  if description is not None and (
@@ -292,6 +295,10 @@ class SmileHelper(SmileCommon):
292
295
  elif appl.pwclass not in THERMOSTAT_CLASSES:
293
296
  appl.location = self._home_location
294
297
 
298
+ # Don't show orphaned thermostat-types
299
+ if appl.pwclass in THERMOSTAT_CLASSES and appl.location is None:
300
+ continue
301
+
295
302
  appl.dev_id = appliance.attrib["id"]
296
303
  appl.name = appliance.find("name").text
297
304
  appl.model = None
@@ -302,24 +309,15 @@ class SmileHelper(SmileCommon):
302
309
  appl.zigbee_mac = None
303
310
  appl.vendor_name = None
304
311
 
305
- # Determine class for this appliance
306
- # Skip on heater_central when no active device present
312
+ # Collect appliance info, skip orphaned/removed devices
307
313
  if not (appl := self._appliance_info_finder(appl, appliance)):
308
314
  continue
309
315
 
310
- # Skip orphaned heater_central (Core Issue #104433)
311
- if appl.pwclass == "heater_central" and appl.dev_id != self._heater_id:
312
- continue
313
-
314
316
  # P1: for gateway and smartmeter switch device_id - part 1
315
317
  # This is done to avoid breakage in HA Core
316
318
  if appl.pwclass == "gateway" and self.smile_type == "power":
317
319
  appl.dev_id = appl.location
318
320
 
319
- # Don't show orphaned thermostat-types or the OpenTherm Gateway.
320
- if appl.pwclass in THERMOSTAT_CLASSES and appl.location is None:
321
- continue
322
-
323
321
  self._create_gw_devices(appl)
324
322
 
325
323
  # For P1 collect the connected SmartMeter info
@@ -355,23 +353,32 @@ class SmileHelper(SmileCommon):
355
353
  self.loc_data[loc.loc_id] = {"name": loc.name}
356
354
 
357
355
  def _p1_smartmeter_info_finder(self, appl: Munch) -> None:
358
- """Collect P1 DSMR Smartmeter info."""
356
+ """Collect P1 DSMR SmartMeter info."""
359
357
  loc_id = next(iter(self.loc_data.keys()))
358
+ location = self._domain_objects.find(f'./location[@id="{loc_id}"]')
359
+ locator = "./logs/point_log/electricity_point_meter"
360
+ mod_type = "electricity_point_meter"
361
+ module_data = self._get_module_data(location, locator, mod_type)
362
+ if not module_data["contents"]:
363
+ LOGGER.error("No module data found for SmartMeter") # pragma: no cover
364
+ return None # pragma: no cover
365
+
360
366
  appl.dev_id = self.gateway_id
367
+ appl.firmware = module_data["firmware_version"]
368
+ appl.hardware = module_data["hardware_version"]
361
369
  appl.location = loc_id
362
370
  appl.mac = None
363
- appl.model = None
364
- appl.model_id = None
371
+ appl.model = module_data["vendor_model"]
372
+ appl.model_id = None # don't use model_id for SmartMeter
365
373
  appl.name = "P1"
366
374
  appl.pwclass = "smartmeter"
375
+ appl.vendor_name = module_data["vendor_name"]
367
376
  appl.zigbee_mac = None
368
- location = self._domain_objects.find(f'./location[@id="{loc_id}"]')
369
- appl = self._energy_device_info_finder(appl, location)
370
377
 
371
378
  self._create_gw_devices(appl)
372
379
 
373
380
  def _appliance_info_finder(self, appl: Munch, appliance: etree) -> Munch:
374
- """Collect device info (Smile/Stretch, Thermostats, OpenTherm/On-Off): firmware, model and vendor name."""
381
+ """Collect info for all appliances found."""
375
382
  match appl.pwclass:
376
383
  case "gateway":
377
384
  # Collect gateway device info
@@ -383,45 +390,28 @@ class SmileHelper(SmileCommon):
383
390
  # Collect heater_central device info
384
391
  self._appl_heater_central_info(appl, appliance, False) # False means non-legacy device
385
392
  self._appl_dhw_mode_info(appl, appliance)
393
+ # Skip orphaned heater_central (Core Issue #104433)
394
+ if appl.dev_id != self._heater_id:
395
+ return Munch()
396
+ return appl
397
+ case _ as s if s.endswith("_plug"):
398
+ # Collect info from plug-types (Plug, Aqara Smart Plug)
399
+ locator = "./logs/interval_log/electricity_interval_meter"
400
+ mod_type = "electricity_interval_meter"
401
+ module_data = self._get_module_data(appliance, locator, mod_type)
402
+ # A plug without module-data is orphaned/ no present
403
+ if not module_data["contents"]:
404
+ return Munch()
405
+
406
+ appl.firmware = module_data["firmware_version"]
407
+ appl.hardware = module_data["hardware_version"]
408
+ appl.model_id = module_data["vendor_model"]
409
+ appl.vendor_name = module_data["vendor_name"]
410
+ appl.model = check_model(appl.model_id, appl.vendor_name)
411
+ appl.zigbee_mac = module_data["zigbee_mac_address"]
412
+ return appl
413
+ case _: # pragma: no cover
386
414
  return appl
387
- case _:
388
- # Collect info from power-related devices (Plug, Aqara Smart Plug)
389
- return self._energy_device_info_finder(appl, appliance)
390
-
391
- def _energy_device_info_finder(self, appl: Munch, appliance: etree) -> Munch:
392
- """Helper-function for _appliance_info_finder().
393
-
394
- Collect energy device info (Smartmeter): firmware, model and vendor name.
395
- """
396
- if self.smile_type == "power":
397
- locator = "./logs/point_log/electricity_point_meter"
398
- mod_type = "electricity_point_meter"
399
- module_data = self._get_module_data(appliance, locator, mod_type)
400
- appl.hardware = module_data["hardware_version"]
401
- appl.model = module_data["vendor_model"] # don't use model_id for Smartmeter
402
- appl.vendor_name = module_data["vendor_name"]
403
- appl.firmware = module_data["firmware_version"]
404
-
405
- return appl
406
-
407
- if self.smile(ADAM):
408
- locator = "./logs/interval_log/electricity_interval_meter"
409
- mod_type = "electricity_interval_meter"
410
- module_data = self._get_module_data(appliance, locator, mod_type)
411
- # Filter appliance without zigbee_mac, it's an orphaned device
412
- appl.zigbee_mac = module_data["zigbee_mac_address"]
413
- if appl.zigbee_mac is None:
414
- return None
415
-
416
- appl.vendor_name = module_data["vendor_name"]
417
- appl.model_id = module_data["vendor_model"]
418
- appl.model = check_model(appl.model_id, appl.vendor_name)
419
- appl.hardware = module_data["hardware_version"]
420
- appl.firmware = module_data["firmware_version"]
421
-
422
- return appl
423
-
424
- return appl # pragma: no cover
425
415
 
426
416
  def _appl_gateway_info(self, appl: Munch, appliance: etree) -> Munch:
427
417
  """Helper-function for _appliance_info_finder()."""
@@ -726,15 +716,18 @@ class SmileHelper(SmileCommon):
726
716
  Collect the availability-status for wireless connected devices.
727
717
  """
728
718
  if self.smile(ADAM):
729
- # Collect for Plugs
719
+ # Try collecting for a Plug
730
720
  locator = "./logs/interval_log/electricity_interval_meter"
731
721
  mod_type = "electricity_interval_meter"
732
722
  module_data = self._get_module_data(appliance, locator, mod_type)
733
- if module_data["reachable"] is None:
734
- # Collect for wireless thermostats
723
+ if not module_data["contents"]:
724
+ # Try collecting for a wireless thermostat
735
725
  locator = "./logs/point_log[type='thermostat']/thermostat"
736
726
  mod_type = "thermostat"
737
727
  module_data = self._get_module_data(appliance, locator, mod_type)
728
+ if not module_data["contents"]:
729
+ LOGGER.error("No module data found for Plug or wireless thermostat") # pragma: no cover
730
+ return None # pragma: no cover
738
731
 
739
732
  if module_data["reachable"] is not None:
740
733
  data["available"] = module_data["reachable"]
@@ -86,8 +86,8 @@ class SmileLegacyData(SmileLegacyHelper):
86
86
  data["select_schedule"] = sel_schedule
87
87
  self._count += 2
88
88
 
89
- # Operation modes: auto, heat
90
- data["mode"] = "auto"
89
+ # Set HA climate HVACMode: auto, heat
90
+ data["climate_mode"] = "auto"
91
91
  self._count += 1
92
92
  if sel_schedule in (NONE, OFF):
93
- data["mode"] = "heat"
93
+ data["climate_mode"] = "heat"
@@ -115,7 +115,7 @@ def check_model(name: str | None, vendor_name: str | None) -> str | None:
115
115
  if name is not None and "lumi.plug" in name:
116
116
  return "Aqara Smart Plug"
117
117
 
118
- return name
118
+ return name # pragma: no cover
119
119
 
120
120
 
121
121
  def common_match_cases(
@@ -173,10 +173,8 @@ def format_measure(measure: str, unit: str) -> float | int:
173
173
  result = float(f"{round(float_measure, 1):.1f}")
174
174
  elif abs(float_measure) < 10:
175
175
  result = float(f"{round(float_measure, 2):.2f}")
176
- elif abs(float_measure) >= 10 and abs(float_measure) < 100:
176
+ elif abs(float_measure) >= 10:
177
177
  result = float(f"{round(float_measure, 1):.1f}")
178
- elif abs(float_measure) >= 100:
179
- result = int(round(float_measure))
180
178
 
181
179
  return result
182
180
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: plugwise
3
- Version: 1.4.4
3
+ Version: 1.5.1
4
4
  Summary: Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3.
5
5
  Home-page: https://github.com/plugwise/python-plugwise
6
6
  Author: Plugwise device owners
@@ -1,10 +1,10 @@
1
1
  [build-system]
2
- requires = ["setuptools~=75.1", "wheel~=0.44.0"]
2
+ requires = ["setuptools~=75.1", "wheel~=0.45.0"]
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "plugwise"
7
- version = "1.4.4"
7
+ version = "1.5.1"
8
8
  license = {file = "LICENSE"}
9
9
  description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3."
10
10
  readme = "README.md"
@@ -323,7 +323,6 @@ class TestPlugwise: # pylint: disable=attribute-defined-outside-init
323
323
  username=pw_constants.DEFAULT_USERNAME,
324
324
  password=test_password,
325
325
  port=server.port,
326
- timeout=pw_constants.DEFAULT_TIMEOUT,
327
326
  websession=None,
328
327
  )
329
328
  lack_of_websession = False
@@ -337,18 +336,18 @@ class TestPlugwise: # pylint: disable=attribute-defined-outside-init
337
336
  username=pw_constants.DEFAULT_USERNAME,
338
337
  password=test_password,
339
338
  port=server.port,
340
- timeout=pw_constants.DEFAULT_TIMEOUT,
341
339
  websession=websession,
342
340
  )
343
341
 
344
342
  if not timeout:
345
- assert smile._timeout == 10
343
+ assert smile._timeout == 30
346
344
 
347
345
  # Connect to the smile
348
346
  version = None
349
347
  try:
350
348
  version = await smile.connect()
351
349
  assert version is not None
350
+ assert smile._timeout == 10
352
351
  return server, smile, client
353
352
  except (
354
353
  pw_exceptions.ConnectionFailedError,
@@ -408,7 +407,6 @@ class TestPlugwise: # pylint: disable=attribute-defined-outside-init
408
407
  username=pw_constants.DEFAULT_USERNAME,
409
408
  password=test_password,
410
409
  port=server.port,
411
- timeout=pw_constants.DEFAULT_LEGACY_TIMEOUT,
412
410
  websession=None,
413
411
  )
414
412
  lack_of_websession = False
@@ -422,7 +420,6 @@ class TestPlugwise: # pylint: disable=attribute-defined-outside-init
422
420
  username=pw_constants.DEFAULT_USERNAME,
423
421
  password=test_password,
424
422
  port=server.port,
425
- timeout=pw_constants.DEFAULT_LEGACY_TIMEOUT,
426
423
  websession=websession,
427
424
  )
428
425
 
@@ -434,6 +431,7 @@ class TestPlugwise: # pylint: disable=attribute-defined-outside-init
434
431
  try:
435
432
  version = await smile.connect()
436
433
  assert version is not None
434
+ assert smile._timeout == 30
437
435
  return server, smile, client
438
436
  except (
439
437
  pw_exceptions.ConnectionFailedError,
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes