PyPlumIO 0.5.2__py3-none-any.whl → 0.5.3__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyPlumIO
3
- Version: 0.5.2
3
+ Version: 0.5.3
4
4
  Summary: PyPlumIO is a native ecoNET library for Plum ecoMAX controllers.
5
5
  Author-email: Denis Paavilainen <denpa@denpa.pro>
6
6
  License: MIT License
@@ -1,6 +1,6 @@
1
1
  pyplumio/__init__.py,sha256=91S0kRCFRiKnYUFtsX6csms5lpYmo-vBFzY79Z0JosA,1257
2
2
  pyplumio/__main__.py,sha256=oop76iR-XDHhMFhW4LO8-xTnBHsqzUQ5VVh__94OaqY,499
3
- pyplumio/_version.py,sha256=9wH2PDsTkkxdqSU9YziEjDTHYLEcKPSYr6RofNSEaJk,411
3
+ pyplumio/_version.py,sha256=K25B5cRxbd2Y1cTvVAAebSFlg1bmeo325UqZhsnzGII,411
4
4
  pyplumio/connection.py,sha256=2mAJOLtIWZ77eLnXYEvy40anmkmNRjGNFNBgN4BnyO8,5502
5
5
  pyplumio/const.py,sha256=p7UGyDwWxA6MCzZE6wt-Fz9IDI62joehMB7WH6jzGAI,3812
6
6
  pyplumio/exceptions.py,sha256=cpLGRl9db6cU1Z6WXhQ7yl1V7Te193QymWiOoRF8KAI,798
@@ -9,19 +9,19 @@ pyplumio/protocol.py,sha256=4w-3I9xBp1HuUjkMmMLBPOAlwiMQmtFspkHgWQmInlw,6306
9
9
  pyplumio/stream.py,sha256=g_lZkMWuYmFQ4mZrkP6kLxrmWpnQrLmiBIv0f-to38U,4024
10
10
  pyplumio/utils.py,sha256=5QF-oJar4DfaaUHqrMIfKPFJFWGBLQfgo4nYo4doJWw,651
11
11
  pyplumio/devices/__init__.py,sha256=jvIzLEstgOrESxJInp52fwq0ePVmgjau-cNEqw2RfNk,4947
12
- pyplumio/devices/ecomax.py,sha256=2V1qEUABr6YlH5fSMQbdELluh_QX_QRcgPqkRdXhjAM,16423
12
+ pyplumio/devices/ecomax.py,sha256=V30HucVvy_oHLqV0CuJ-gleL0S2Qb8IFeio92HnUAfQ,15927
13
13
  pyplumio/devices/ecoster.py,sha256=ds1qwCqdNDa4s-GixDic2LVWyQmrkzAYpbKOnN0zjfE,300
14
- pyplumio/devices/mixer.py,sha256=7gwOQXN4T7Dl3Qh3qjR5YvIA0IZOCW7l-MOF8s4ohHg,2855
15
- pyplumio/devices/thermostat.py,sha256=b2A_FKR60txdSbcyOX_vFppdbnFpVrbVzGYkZWlLJRU,2263
14
+ pyplumio/devices/mixer.py,sha256=KgrjUcyjxCtnGUNlutPSp-kfXcMixLrHs7Y8DOW46_Q,2655
15
+ pyplumio/devices/thermostat.py,sha256=s0UIv5R1G4YGGNoTzFDlsYFM-7Q7BKiJWc77B0dnXeE,2162
16
16
  pyplumio/frames/__init__.py,sha256=7I6L4f7F3vOdqebOFze5k774LrvKKgdSZFsmMkqdMA4,7114
17
- pyplumio/frames/messages.py,sha256=u1s1YwiHMyrSQARBZHTTm-SjpQE5vN-iaE81Zz8M7vk,3570
17
+ pyplumio/frames/messages.py,sha256=uSN2kKzYRvO6GjqwH6UJej2f2jouuOdw1bdmPCkTTH0,3608
18
18
  pyplumio/frames/requests.py,sha256=bV1mlcNURzdNe4ihIaArBwUUKPCO6yfa4Se-D1uy83s,6760
19
19
  pyplumio/frames/responses.py,sha256=o0bMPr2Rkf5S0AXfvT9qwLmQ5apLmzu9Aa3oI2MIS54,6142
20
20
  pyplumio/helpers/__init__.py,sha256=H2xxdkF-9uADLwEbfBUoxNTdwru3L5Z2cfJjgsuRsn0,31
21
21
  pyplumio/helpers/data_types.py,sha256=O2dI0wAkBUDxsfJMWuPvFdpT9XjhHw-gbqMIeQ55O4w,7347
22
22
  pyplumio/helpers/event_manager.py,sha256=AguUPtH-pirAg7D7TI-SVRyNpui_z1GQsfM9LUEGsMM,4117
23
23
  pyplumio/helpers/factory.py,sha256=403RYqlKbWRmL-RngzL1e2p5iI5_JTzwf65HeNxHfwM,527
24
- pyplumio/helpers/parameter.py,sha256=I_yRe8MiDfA9SBumI4HtV0G0T1P1Ni61gkbB5iGT9Zc,8455
24
+ pyplumio/helpers/parameter.py,sha256=mC1AW6XxFN03mIn5n4vNbWQOrcrz1ujbK_LnHyiDHTk,8286
25
25
  pyplumio/helpers/schedule.py,sha256=muS8xwiReBG-p_F2-VVMKPfWtJxa9aMLr8-HHFBNsS8,4621
26
26
  pyplumio/helpers/task_manager.py,sha256=fZyBmHik7rU9Kb4EECQWqVrJPUlEtEyxrEUJcf8RVYc,1072
27
27
  pyplumio/helpers/timeout.py,sha256=UstSwBfrLO_YhUHHvhIgunAw89s6PocR80nmU5LN4oI,915
@@ -29,32 +29,32 @@ pyplumio/helpers/typing.py,sha256=EW6jKweM6R6fvXWdGjxAKp_9y9pN_R49YDtWVAFisqE,51
29
29
  pyplumio/helpers/uid.py,sha256=eGp8xosBcvL7wc35-PcnDnMEva3WHe7WtfRpQwsrpps,975
30
30
  pyplumio/structures/__init__.py,sha256=L976WdfoNb_Mmv-pN86XKBLEZydsVlD_Xlw85cnCS3E,1247
31
31
  pyplumio/structures/alerts.py,sha256=GcvEU_mL34eSmt9QsjGjRADq-oN2Flw0FDknN5ssOZU,3089
32
+ pyplumio/structures/boiler_load.py,sha256=tRlKr5gZQ-UZh042f98wH3ctOuXgCAb16ne_zFP5I28,860
33
+ pyplumio/structures/boiler_power.py,sha256=BRl3QkPtoFoEVHUeWN5KKkxATIO4-EZB-0fEsvRKECI,923
32
34
  pyplumio/structures/data_schema.py,sha256=uloA46Vip1KzBK710g7j_rrNQvfwX8qUgO7rWwSmHn0,1497
33
- pyplumio/structures/ecomax_parameters.py,sha256=7RQkyZwCxaeezWRBGr_jhBVHW_sJFKF5_3sTft6eT_k,25802
35
+ pyplumio/structures/ecomax_parameters.py,sha256=ifoCOxvBUp39A6B6avjv03Rjd3eQ3qRDhe-35bVvJpI,25913
34
36
  pyplumio/structures/fan_power.py,sha256=cBLmns_nh8I5eDNehFM1QMe5eqlUC-QBBm1i0kTbj38,893
35
37
  pyplumio/structures/frame_versions.py,sha256=SkHrgehJbf14Qf_uKY8zlZp8d8WjgAq3Swwjf1Y1trw,1572
36
38
  pyplumio/structures/fuel_consumption.py,sha256=qxT8vtOX6VIv6MgvTalYlsN7FIBzXL3ba8VHO2b6mbs,998
37
39
  pyplumio/structures/fuel_level.py,sha256=XqqciKIBM8-zmG_JNc9ILff3Rgd4aCgvht7STrw9Dz0,851
38
40
  pyplumio/structures/lambda_sensor.py,sha256=2aEZjY8y7qV76Ky4gE4Ui7zWyXxCQRdtMingtMBKhF0,1475
39
- pyplumio/structures/load.py,sha256=yff7midElGziTpSSHmn98poEQmDN48XntTrQiV9iRdE,812
40
- pyplumio/structures/mixer_parameters.py,sha256=AzPPywRDSZZMGpAhDPiKcmar4Vs-8RWA066BjF2dH0Y,8081
41
+ pyplumio/structures/mixer_parameters.py,sha256=_dZrvXYfg1viUPPKVUcHZsO2kytT2IAHKMjP-B4J-GQ,8178
41
42
  pyplumio/structures/mixer_sensors.py,sha256=sKm1gIoRcCLVad-9MqOkEwu_bXIZy-3Kbi2kCd5wOkM,2243
42
43
  pyplumio/structures/modules.py,sha256=y1WRxKk3vW3erquzsVd4G7mDLlna8DttueeUu0jCgYw,2532
43
44
  pyplumio/structures/network_info.py,sha256=SHKqMHI1Gx-wNwq8UExwH29Z2e9JGZgG9hBRmkOTq-s,3746
44
45
  pyplumio/structures/output_flags.py,sha256=JY_IVncL_ZnIV2xXfEXLDK8x2tPulIW1PZpWVHgC-C4,1367
45
46
  pyplumio/structures/outputs.py,sha256=dS0dYsl9bWLuZmj5rt0Dcg1chyQhjFOIwA6KU4Yw76g,1938
46
47
  pyplumio/structures/pending_alerts.py,sha256=L_uaizbL_H3gYkpPBN0T0H8Q4jNo17-5-QamiF5tQO0,761
47
- pyplumio/structures/power.py,sha256=kGTYCJBmTnVylwVlHGcJcYvUnZ6DsRx5AzCnvxjVmnI,868
48
48
  pyplumio/structures/product_info.py,sha256=xPBbvBFgRIMP8tg4-fjIYE1AEtfBquCUWSAwsYItt6M,2331
49
49
  pyplumio/structures/program_version.py,sha256=5gOmKpbr2ftsXtJ5Hqkg__30DRYtB-CAx5sXIvCLQeM,2477
50
50
  pyplumio/structures/regulator_data.py,sha256=dleGP3ODIc8vJupXdF-PRiU8MYlzJOFINWoqdtrZCcI,2506
51
51
  pyplumio/structures/schedules.py,sha256=gRABgo3keVO37zX_lsTrd0M6758eZ3aRD4XNrsQoK_s,6093
52
52
  pyplumio/structures/statuses.py,sha256=IWcQ1TNfvhVitF_vxTeF3c4txpU54NOyi4l445SJVk8,1188
53
53
  pyplumio/structures/temperatures.py,sha256=4Q3tfYNCFi4VhTlkCO9eF3GLgsfJD21cdefRri3PkIk,2388
54
- pyplumio/structures/thermostat_parameters.py,sha256=SDejj4PpsV11wSunBY_HcrW5kduVER-sOvE2VP4Qqbc,7469
54
+ pyplumio/structures/thermostat_parameters.py,sha256=-sfSRtoL4l3R7r2F9KzQShW49-65Q4qVgMs5lPcKcIM,7497
55
55
  pyplumio/structures/thermostat_sensors.py,sha256=sEH42iq05Wijfhfrv9o4iJcxX8EOcPoWcLpzUpq3qQ8,3071
56
- PyPlumIO-0.5.2.dist-info/LICENSE,sha256=g56wJgobsehVtkJD8MhM6isAnsdOUmRPv7fIaXI4Joo,1067
57
- PyPlumIO-0.5.2.dist-info/METADATA,sha256=GDSTc8QJMAARf0eI2frA02PZpYDea29MWjjnGLAW5cE,4848
58
- PyPlumIO-0.5.2.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
59
- PyPlumIO-0.5.2.dist-info/top_level.txt,sha256=kNBz9UPPkPD9teDn3U_sEy5LjzwLm9KfADCXtBlbw8A,9
60
- PyPlumIO-0.5.2.dist-info/RECORD,,
56
+ PyPlumIO-0.5.3.dist-info/LICENSE,sha256=g56wJgobsehVtkJD8MhM6isAnsdOUmRPv7fIaXI4Joo,1067
57
+ PyPlumIO-0.5.3.dist-info/METADATA,sha256=1RALiqaxnd06-AYu_rghZx65tetG5eqZx8q2xWczsC8,4848
58
+ PyPlumIO-0.5.3.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
59
+ PyPlumIO-0.5.3.dist-info/top_level.txt,sha256=kNBz9UPPkPD9teDn3U_sEy5LjzwLm9KfADCXtBlbw8A,9
60
+ PyPlumIO-0.5.3.dist-info/RECORD,,
pyplumio/_version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.5.2'
16
- __version_tuple__ = version_tuple = (0, 5, 2)
15
+ __version__ = version = '0.5.3'
16
+ __version_tuple__ = version_tuple = (0, 5, 3)
@@ -12,8 +12,6 @@ from pyplumio.const import (
12
12
  ATTR_PASSWORD,
13
13
  ATTR_SENSORS,
14
14
  ATTR_STATE,
15
- STATE_OFF,
16
- STATE_ON,
17
15
  DeviceState,
18
16
  DeviceType,
19
17
  FrameType,
@@ -212,14 +210,7 @@ class EcoMAX(Addressable):
212
210
  )
213
211
  await self.dispatch(
214
212
  description.name,
215
- cls(
216
- device=self,
217
- description=description,
218
- index=index,
219
- value=values.value,
220
- min_value=values.min_value,
221
- max_value=values.max_value,
222
- ),
213
+ cls(device=self, description=description, index=index, values=values),
223
214
  )
224
215
 
225
216
  return True
@@ -322,14 +313,7 @@ class EcoMAX(Addressable):
322
313
  )
323
314
  await self.dispatch(
324
315
  description.name,
325
- cls(
326
- device=self,
327
- description=description,
328
- index=index,
329
- value=values.value,
330
- min_value=values.min_value,
331
- max_value=values.max_value,
332
- ),
316
+ cls(device=self, description=description, index=index, values=values),
333
317
  )
334
318
 
335
319
  return True
@@ -354,9 +338,11 @@ class EcoMAX(Addressable):
354
338
  EcomaxBinaryParameter(
355
339
  device=self,
356
340
  description=ECOMAX_CONTROL_PARAMETER,
357
- value=(mode != DeviceState.OFF),
358
- min_value=STATE_OFF,
359
- max_value=STATE_ON,
341
+ values=ParameterValues(
342
+ value=int(mode != DeviceState.OFF),
343
+ min_value=0,
344
+ max_value=1,
345
+ ),
360
346
  ),
361
347
  )
362
348
 
@@ -386,11 +372,7 @@ class EcoMAX(Addressable):
386
372
  """Add thermostat profile parameter to the dataset."""
387
373
  if values is not None:
388
374
  return EcomaxParameter(
389
- device=self,
390
- description=THERMOSTAT_PROFILE_PARAMETER,
391
- value=values.value,
392
- min_value=values.min_value,
393
- max_value=values.max_value,
375
+ device=self, description=THERMOSTAT_PROFILE_PARAMETER, values=values
394
376
  )
395
377
 
396
378
  return None
pyplumio/devices/mixer.py CHANGED
@@ -73,14 +73,7 @@ class Mixer(SubDevice):
73
73
  )
74
74
  await self.dispatch(
75
75
  description.name,
76
- cls(
77
- device=self,
78
- description=description,
79
- index=index,
80
- value=values.value,
81
- min_value=values.min_value,
82
- max_value=values.max_value,
83
- ),
76
+ cls(device=self, description=description, index=index, values=values),
84
77
  )
85
78
 
86
79
  return True
@@ -58,9 +58,7 @@ class Thermostat(SubDevice):
58
58
  device=self,
59
59
  description=description,
60
60
  index=index,
61
- value=values.value,
62
- min_value=values.min_value,
63
- max_value=values.max_value,
61
+ values=values,
64
62
  offset=(self.index * len(parameters)),
65
63
  ),
66
64
  )
@@ -13,18 +13,18 @@ from pyplumio.const import (
13
13
  )
14
14
  from pyplumio.frames import Message
15
15
  from pyplumio.helpers.typing import EventDataType
16
+ from pyplumio.structures.boiler_load import BoilerLoadStructure
17
+ from pyplumio.structures.boiler_power import BoilerPowerStructure
16
18
  from pyplumio.structures.fan_power import FanPowerStructure
17
19
  from pyplumio.structures.frame_versions import FrameVersionsStructure
18
20
  from pyplumio.structures.fuel_consumption import FuelConsumptionStructure
19
21
  from pyplumio.structures.fuel_level import FuelLevelStructure
20
22
  from pyplumio.structures.lambda_sensor import LambdaSensorStructure
21
- from pyplumio.structures.load import LoadStructure
22
23
  from pyplumio.structures.mixer_sensors import MixerSensorsStructure
23
24
  from pyplumio.structures.modules import ModulesStructure
24
25
  from pyplumio.structures.output_flags import OutputFlagsStructure
25
26
  from pyplumio.structures.outputs import OutputsStructure
26
27
  from pyplumio.structures.pending_alerts import PendingAlertsStructure
27
- from pyplumio.structures.power import PowerStructure
28
28
  from pyplumio.structures.regulator_data import RegulatorDataStructure
29
29
  from pyplumio.structures.statuses import StatusesStructure
30
30
  from pyplumio.structures.temperatures import TemperaturesStructure
@@ -64,8 +64,8 @@ class SensorDataMessage(Message):
64
64
  sensors, offset = FuelLevelStructure(self).decode(message, offset, sensors)
65
65
  sensors[ATTR_TRANSMISSION] = message[offset]
66
66
  sensors, offset = FanPowerStructure(self).decode(message, offset + 1, sensors)
67
- sensors, offset = LoadStructure(self).decode(message, offset, sensors)
68
- sensors, offset = PowerStructure(self).decode(message, offset, sensors)
67
+ sensors, offset = BoilerLoadStructure(self).decode(message, offset, sensors)
68
+ sensors, offset = BoilerPowerStructure(self).decode(message, offset, sensors)
69
69
  sensors, offset = FuelConsumptionStructure(self).decode(
70
70
  message, offset, sensors
71
71
  )
@@ -57,6 +57,8 @@ def _normalize_parameter_value(value: ParameterValueType) -> int:
57
57
  class ParameterValues:
58
58
  """Represents a parameter values."""
59
59
 
60
+ __slots__ = "value", "min_value", "max_value"
61
+
60
62
  value: int
61
63
  min_value: int
62
64
  max_value: int
@@ -80,18 +82,14 @@ class Parameter:
80
82
 
81
83
  device: Device
82
84
  description: ParameterDescription
83
- _value: int
84
- _min_value: int
85
- _max_value: int
85
+ _values: ParameterValues
86
86
  _index: int
87
87
  _pending_update: bool = False
88
88
 
89
89
  def __init__(
90
90
  self,
91
91
  device: Device,
92
- value: ParameterValueType,
93
- min_value: ParameterValueType,
94
- max_value: ParameterValueType,
92
+ values: ParameterValues,
95
93
  description: ParameterDescription,
96
94
  index: int = 0,
97
95
  ):
@@ -99,9 +97,7 @@ class Parameter:
99
97
  self.index = index
100
98
  self.device = device
101
99
  self.description = description
102
- self._value = _normalize_parameter_value(value)
103
- self._min_value = _normalize_parameter_value(min_value)
104
- self._max_value = _normalize_parameter_value(max_value)
100
+ self._values = values
105
101
  self._pending_update = False
106
102
  self._index = index
107
103
 
@@ -110,22 +106,18 @@ class Parameter:
110
106
  return (
111
107
  f"{self.__class__.__name__}("
112
108
  f"device={self.device.__class__.__name__}, "
113
- f"description={self.description}, value={self.value}, "
114
- f"min_value={self.min_value}, max_value={self.max_value})"
109
+ f"values={self._values}, "
110
+ f"description={self.description})"
115
111
  )
116
112
 
117
- def __getattr__(self, name: str):
118
- """Return attributes from the parameter description."""
119
- return getattr(self.description, name)
120
-
121
113
  def _call_relational_method(self, method_to_call, other):
122
114
  """Call a specified relational method."""
123
- func = getattr(self._value, method_to_call)
115
+ func = getattr(self._values.value, method_to_call)
124
116
  return func(_normalize_parameter_value(other))
125
117
 
126
118
  def __int__(self) -> int:
127
119
  """Return an integer representation of parameter's value."""
128
- return self._value
120
+ return self._values.value
129
121
 
130
122
  def __add__(self, other) -> int:
131
123
  """Return result of addition."""
@@ -167,7 +159,7 @@ class Parameter:
167
159
  """Compare if parameter value is less that other."""
168
160
  return self._call_relational_method("__lt__", other)
169
161
 
170
- async def _confirm_parameter_change(self, parameter: Parameter) -> None:
162
+ async def _confirm_parameter_change(self, _: Parameter) -> None:
171
163
  """A callback for when parameter change is confirmed on
172
164
  the device.
173
165
  """
@@ -175,15 +167,15 @@ class Parameter:
175
167
 
176
168
  async def set(self, value: ParameterValueType, retries: int = SET_RETRIES) -> bool:
177
169
  """Set a parameter value."""
178
- if (value := _normalize_parameter_value(value)) == self._value:
170
+ if (value := _normalize_parameter_value(value)) == self._values.value:
179
171
  return True
180
172
 
181
- if value < self._min_value or value > self._max_value:
173
+ if value < self._values.min_value or value > self._values.max_value:
182
174
  raise ValueError(
183
175
  f"Parameter value must be between '{self.min_value}' and '{self.max_value}'"
184
176
  )
185
177
 
186
- self._value = value
178
+ self._values.value = value
187
179
  self._pending_update = True
188
180
  self.device.subscribe_once(
189
181
  self.description.name, self._confirm_parameter_change
@@ -217,17 +209,22 @@ class Parameter:
217
209
  @property
218
210
  def value(self) -> ParameterValueType:
219
211
  """A parameter value."""
220
- return self._value
212
+ return self._values.value
221
213
 
222
214
  @property
223
215
  def min_value(self) -> ParameterValueType:
224
216
  """Minimum allowed value."""
225
- return self._min_value
217
+ return self._values.min_value
226
218
 
227
219
  @property
228
220
  def max_value(self) -> ParameterValueType:
229
221
  """Maximum allowed value."""
230
- return self._max_value
222
+ return self._values.max_value
223
+
224
+ @property
225
+ def unit_of_measurement(self) -> UnitOfMeasurement | Literal["%"] | None:
226
+ """A unit of measurement."""
227
+ return self.description.unit_of_measurement
231
228
 
232
229
  @property
233
230
  def request(self) -> Request:
@@ -257,7 +254,7 @@ class BinaryParameter(Parameter):
257
254
  @property
258
255
  def value(self) -> ParameterValueType:
259
256
  """A parameter value."""
260
- return STATE_ON if self._value == 1 else STATE_OFF
257
+ return STATE_ON if self._values.value == 1 else STATE_OFF
261
258
 
262
259
  @property
263
260
  def min_value(self) -> ParameterValueType:
@@ -8,20 +8,20 @@ from pyplumio.helpers.typing import EventDataType
8
8
  from pyplumio.structures import StructureDecoder
9
9
  from pyplumio.utils import ensure_dict
10
10
 
11
- ATTR_LOAD: Final = "load"
11
+ ATTR_BOILER_LOAD: Final = "boiler_load"
12
12
 
13
13
 
14
- class LoadStructure(StructureDecoder):
14
+ class BoilerLoadStructure(StructureDecoder):
15
15
  """Represents a boiler load sensor data structure."""
16
16
 
17
17
  def decode(
18
18
  self, message: bytearray, offset: int = 0, data: EventDataType | None = None
19
19
  ) -> tuple[EventDataType, int]:
20
20
  """Decode bytes and return message data and offset."""
21
- load = message[offset]
21
+ boiler_load = message[offset]
22
22
  offset += 1
23
23
 
24
- if load == BYTE_UNDEFINED:
24
+ if boiler_load == BYTE_UNDEFINED:
25
25
  return ensure_dict(data), offset
26
26
 
27
- return (ensure_dict(data, {ATTR_LOAD: load}), offset)
27
+ return (ensure_dict(data, {ATTR_BOILER_LOAD: boiler_load}), offset)
@@ -9,20 +9,20 @@ from pyplumio.helpers.typing import EventDataType
9
9
  from pyplumio.structures import StructureDecoder
10
10
  from pyplumio.utils import ensure_dict
11
11
 
12
- ATTR_POWER: Final = "power"
12
+ ATTR_BOILER_POWER: Final = "boiler_power"
13
13
 
14
14
 
15
- class PowerStructure(StructureDecoder):
15
+ class BoilerPowerStructure(StructureDecoder):
16
16
  """Represents a boiler power sensor data structure."""
17
17
 
18
18
  def decode(
19
19
  self, message: bytearray, offset: int = 0, data: EventDataType | None = None
20
20
  ) -> tuple[EventDataType, int]:
21
21
  """Decode bytes and return message data and offset."""
22
- power = Float.from_bytes(message, offset)
23
- offset += power.size
22
+ boiler_power = Float.from_bytes(message, offset)
23
+ offset += boiler_power.size
24
24
 
25
- if math.isnan(power.value):
25
+ if math.isnan(boiler_power.value):
26
26
  return ensure_dict(data), offset
27
27
 
28
- return ensure_dict(data, {ATTR_POWER: power.value}), offset
28
+ return ensure_dict(data, {ATTR_BOILER_POWER: boiler_power.value}), offset
@@ -51,17 +51,23 @@ class EcomaxParameter(Parameter):
51
51
  @property
52
52
  def value(self) -> ParameterValueType:
53
53
  """A parameter value."""
54
- return (self._value - self.description.offset) * self.description.multiplier
54
+ return (
55
+ self._values.value - self.description.offset
56
+ ) * self.description.multiplier
55
57
 
56
58
  @property
57
59
  def min_value(self) -> ParameterValueType:
58
60
  """Minimum allowed value."""
59
- return (self._min_value - self.description.offset) * self.description.multiplier
61
+ return (
62
+ self._values.min_value - self.description.offset
63
+ ) * self.description.multiplier
60
64
 
61
65
  @property
62
66
  def max_value(self) -> ParameterValueType:
63
67
  """Maximum allowed value."""
64
- return (self._max_value - self.description.offset) * self.description.multiplier
68
+ return (
69
+ self._values.max_value - self.description.offset
70
+ ) * self.description.multiplier
65
71
 
66
72
  @property
67
73
  def request(self) -> Request:
@@ -72,7 +78,7 @@ class EcomaxParameter(Parameter):
72
78
  "frames.requests.EcomaxControlRequest",
73
79
  recipient=self.device.address,
74
80
  data={
75
- ATTR_VALUE: self._value,
81
+ ATTR_VALUE: self._values.value,
76
82
  },
77
83
  )
78
84
 
@@ -82,7 +88,7 @@ class EcomaxParameter(Parameter):
82
88
  recipient=self.device.address,
83
89
  data={
84
90
  ATTR_INDEX: self._index,
85
- ATTR_VALUE: self._value,
91
+ ATTR_VALUE: self._values.value,
86
92
  ATTR_OFFSET: 0,
87
93
  ATTR_SIZE: 1,
88
94
  },
@@ -93,7 +99,7 @@ class EcomaxParameter(Parameter):
93
99
  recipient=self.device.address,
94
100
  data={
95
101
  ATTR_INDEX: self._index,
96
- ATTR_VALUE: self._value,
102
+ ATTR_VALUE: self._values.value,
97
103
  },
98
104
  )
99
105
 
@@ -421,7 +427,7 @@ ECOMAX_PARAMETERS: dict[ProductType, tuple[EcomaxParameterDescription, ...]] = {
421
427
  name="thermostat_decrease_target_temp",
422
428
  unit_of_measurement=UnitOfMeasurement.CELSIUS,
423
429
  ),
424
- EcomaxBinaryParameterDescription(name="thermostat_disable_pump"),
430
+ EcomaxBinaryParameterDescription(name="disable_pump_on_thermostat"),
425
431
  EcomaxParameterDescription(
426
432
  name="boiler_alert_temp", unit_of_measurement=UnitOfMeasurement.CELSIUS
427
433
  ),
@@ -49,17 +49,23 @@ class MixerParameter(Parameter):
49
49
  @property
50
50
  def value(self) -> ParameterValueType:
51
51
  """A parameter value."""
52
- return (self._value - self.description.offset) * self.description.multiplier
52
+ return (
53
+ self._values.value - self.description.offset
54
+ ) * self.description.multiplier
53
55
 
54
56
  @property
55
57
  def min_value(self) -> ParameterValueType:
56
58
  """Minimum allowed value."""
57
- return (self._min_value - self.description.offset) * self.description.multiplier
59
+ return (
60
+ self._values.min_value - self.description.offset
61
+ ) * self.description.multiplier
58
62
 
59
63
  @property
60
64
  def max_value(self) -> ParameterValueType:
61
65
  """Maximum allowed value."""
62
- return (self._max_value - self.description.offset) * self.description.multiplier
66
+ return (
67
+ self._values.max_value - self.description.offset
68
+ ) * self.description.multiplier
63
69
 
64
70
  @property
65
71
  def request(self) -> Request:
@@ -69,7 +75,7 @@ class MixerParameter(Parameter):
69
75
  recipient=self.device.parent.address,
70
76
  data={
71
77
  ATTR_INDEX: self._index,
72
- ATTR_VALUE: self._value,
78
+ ATTR_VALUE: self._values.value,
73
79
  ATTR_DEVICE_INDEX: self.device.index,
74
80
  },
75
81
  )
@@ -125,7 +131,7 @@ MIXER_PARAMETERS: dict[ProductType, tuple[MixerParameterDescription, ...]] = {
125
131
  ),
126
132
  MixerBinaryParameterDescription(name="thermostat_operation"),
127
133
  MixerParameterDescription(name="thermostat_mode"),
128
- MixerBinaryParameterDescription(name="thermostat_disable_pump"),
134
+ MixerBinaryParameterDescription(name="disable_pump_on_thermostat"),
129
135
  MixerBinaryParameterDescription(name="summer_work"),
130
136
  ),
131
137
  ProductType.ECOMAX_I: (
@@ -59,17 +59,17 @@ class ThermostatParameter(Parameter):
59
59
  @property
60
60
  def value(self) -> ParameterValueType:
61
61
  """A parameter value."""
62
- return self._value * self.description.multiplier
62
+ return self._values.value * self.description.multiplier
63
63
 
64
64
  @property
65
65
  def min_value(self) -> ParameterValueType:
66
66
  """Minimum allowed value."""
67
- return self._min_value * self.description.multiplier
67
+ return self._values.min_value * self.description.multiplier
68
68
 
69
69
  @property
70
70
  def max_value(self) -> ParameterValueType:
71
71
  """Maximum allowed value."""
72
- return self._max_value * self.description.multiplier
72
+ return self._values.max_value * self.description.multiplier
73
73
 
74
74
  @property
75
75
  def request(self) -> Request:
@@ -81,7 +81,7 @@ class ThermostatParameter(Parameter):
81
81
  # Increase the index by one to account for thermostat
82
82
  # profile, which is being set at ecoMAX device level.
83
83
  ATTR_INDEX: self._index + 1,
84
- ATTR_VALUE: self._value,
84
+ ATTR_VALUE: self._values.value,
85
85
  ATTR_OFFSET: self.offset,
86
86
  ATTR_SIZE: self.description.size,
87
87
  },