PyPlumIO 0.5.23__py3-none-any.whl → 0.5.24__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.23
3
+ Version: 0.5.24
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=ditJTIOFGJDg60atHzOpiggdUrZHpSynno7MtpZUGVk,3299
2
2
  pyplumio/__main__.py,sha256=3IwHHSq-iay5FaeMc95klobe-xv82yydSKcBE7BFZ6M,500
3
- pyplumio/_version.py,sha256=aPxuFslDuZCOtDq4ZO2Aa91a5YZAmkPaBMygrLp3Bo8,413
3
+ pyplumio/_version.py,sha256=CKGR3DDYRjbp1jSyT2Qw0jSOOwUMwfxFMWArTx28rgk,413
4
4
  pyplumio/connection.py,sha256=6mUbcjGxxEhMVIbzZgCqH-Ez-fcYoRj7ZbVSzpikpNA,5949
5
5
  pyplumio/const.py,sha256=8rpiVbVb5R_6Rm6J2sgCnaVrkD-2Fzhd1RYMz0MBgwo,3915
6
6
  pyplumio/exceptions.py,sha256=Wn-y5AJ5xfaBlHhTUVKB27_0Us8_OVHqh-sicnr9sYA,700
@@ -22,7 +22,7 @@ pyplumio/helpers/__init__.py,sha256=H2xxdkF-9uADLwEbfBUoxNTdwru3L5Z2cfJjgsuRsn0,
22
22
  pyplumio/helpers/data_types.py,sha256=5yxHCnsoKLw5kBM3s6SxwsuKs1C0yK2khyeSrrPXQsQ,8255
23
23
  pyplumio/helpers/event_manager.py,sha256=yH_VjEvIkuYwk31qb3rXtFDfKAStbA-YWWc4ED17jVI,6443
24
24
  pyplumio/helpers/factory.py,sha256=eiTkYUCernUn0VNDDdEN4IyjNPrXK8vnJESXyLaqFzE,1017
25
- pyplumio/helpers/parameter.py,sha256=d57e7Y04hnlQjMiZNkU-yPlBUQASdwbkZFp0LIan2Ig,10858
25
+ pyplumio/helpers/parameter.py,sha256=GoQIp7_JMpFdjPL1iUGI49IQyD-kvFUMqnuIX-v5dao,11137
26
26
  pyplumio/helpers/schedule.py,sha256=-IZJ-CU4PhFlsE586wTw--ovDrTo2Hs4JneCHhc0e-Y,5013
27
27
  pyplumio/helpers/task_manager.py,sha256=HAd69yGTRL0zQsu-ywnbLu1UXiJzgHWuhYWA--vs4lQ,1181
28
28
  pyplumio/helpers/timeout.py,sha256=XM58yaz93cNsxW7Ok6hfBw8i_92HdsGFQVBhpqbCZ70,770
@@ -53,8 +53,8 @@ pyplumio/structures/statuses.py,sha256=wkoynyMRr1VREwfBC6vU48kPA8ZQ83pcXuciy2xHJ
53
53
  pyplumio/structures/temperatures.py,sha256=1CDzehNmbALz1Jyt_9gZNIk52q6Wv-xQXjijVDCVYec,2337
54
54
  pyplumio/structures/thermostat_parameters.py,sha256=ybsab49teETR8pMsSCmPidNe5IclTq8tj7uxtHXGEAY,8045
55
55
  pyplumio/structures/thermostat_sensors.py,sha256=ZmjWgYtTZ5M8Lnz_Q5N4JD8G3MvEmByPFjYsy6XZOmo,3177
56
- PyPlumIO-0.5.23.dist-info/LICENSE,sha256=m-UuZFjXJ22uPTGm9kSHS8bqjsf5T8k2wL9bJn1Y04o,1088
57
- PyPlumIO-0.5.23.dist-info/METADATA,sha256=yArChsVdmu73qgqL-aEc5ht30pmV9-7shz719yTTzSs,5490
58
- PyPlumIO-0.5.23.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
59
- PyPlumIO-0.5.23.dist-info/top_level.txt,sha256=kNBz9UPPkPD9teDn3U_sEy5LjzwLm9KfADCXtBlbw8A,9
60
- PyPlumIO-0.5.23.dist-info/RECORD,,
56
+ PyPlumIO-0.5.24.dist-info/LICENSE,sha256=m-UuZFjXJ22uPTGm9kSHS8bqjsf5T8k2wL9bJn1Y04o,1088
57
+ PyPlumIO-0.5.24.dist-info/METADATA,sha256=gfvAKaTQ9zSS--habg2vmcwrMe7q29dIMU32PFjTWh8,5490
58
+ PyPlumIO-0.5.24.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
59
+ PyPlumIO-0.5.24.dist-info/top_level.txt,sha256=kNBz9UPPkPD9teDn3U_sEy5LjzwLm9KfADCXtBlbw8A,9
60
+ PyPlumIO-0.5.24.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.23'
16
- __version_tuple__ = version_tuple = (0, 5, 23)
15
+ __version__ = version = '0.5.24'
16
+ __version_tuple__ = version_tuple = (0, 5, 24)
@@ -113,9 +113,18 @@ class Parameter(ABC):
113
113
 
114
114
  def _call_relational_method(self, method_to_call: str, other: Any) -> Any:
115
115
  """Call a specified relational method."""
116
- handler = getattr(self.values.value, method_to_call)
117
- other = other.value if isinstance(other, ParameterValues) else other
118
- return handler(_normalize_parameter_value(other))
116
+ if isinstance(other, Parameter):
117
+ other = other.values
118
+
119
+ if isinstance(other, ParameterValues):
120
+ handler = getattr(self.values, method_to_call)
121
+ return handler(other)
122
+
123
+ if isinstance(other, (int, float, bool)) or other in (STATE_OFF, STATE_ON):
124
+ handler = getattr(self.values.value, method_to_call)
125
+ return handler(_normalize_parameter_value(other))
126
+ else:
127
+ return NotImplemented
119
128
 
120
129
  def __int__(self) -> int:
121
130
  """Return an integer representation of parameter's value."""