plugwise 1.6.2__py3-none-any.whl → 1.6.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.
plugwise/data.py CHANGED
@@ -198,7 +198,8 @@ class SmileData(SmileHelper):
198
198
  # Switching groups data
199
199
  self._entity_switching_group(entity, data)
200
200
  # Adam data
201
- self._get_adam_data(entity, data)
201
+ if self.smile(ADAM):
202
+ self._get_adam_data(entity, data)
202
203
 
203
204
  # Thermostat data for Anna (presets, temperatures etc)
204
205
  if self.smile(ANNA) and entity["dev_class"] == "thermostat":
@@ -225,26 +226,26 @@ class SmileData(SmileHelper):
225
226
  """Helper-function for _get_entity_data().
226
227
 
227
228
  Determine Adam heating-status for on-off heating via valves,
228
- available regulations_modes and thermostat control_states.
229
+ available regulations_modes and thermostat control_states,
230
+ and add missing cooling_enabled when required.
229
231
  """
230
- if self.smile(ADAM):
232
+ if entity["dev_class"] == "heater_central":
231
233
  # Indicate heating_state based on valves being open in case of city-provided heating
232
- if (
233
- entity["dev_class"] == "heater_central"
234
- and self._on_off_device
235
- and isinstance(self._heating_valves(), int)
236
- ):
234
+ if self._on_off_device and isinstance(self._heating_valves(), int):
237
235
  data["binary_sensors"]["heating_state"] = self._heating_valves() != 0
238
-
239
- # Show the allowed regulation_modes and gateway_modes
240
- if entity["dev_class"] == "gateway":
241
- if self._reg_allowed_modes:
242
- data["regulation_modes"] = self._reg_allowed_modes
243
- self._count += 1
244
- if self._gw_allowed_modes:
245
- data["gateway_modes"] = self._gw_allowed_modes
246
- self._count += 1
247
-
236
+ # Add cooling_enabled binary_sensor
237
+ if "binary_sensors" in data:
238
+ if "cooling_enabled" not in data["binary_sensors"] and self._cooling_present:
239
+ data["binary_sensors"]["cooling_enabled"] = self._cooling_enabled
240
+
241
+ # Show the allowed regulation_modes and gateway_modes
242
+ if entity["dev_class"] == "gateway":
243
+ if self._reg_allowed_modes:
244
+ data["regulation_modes"] = self._reg_allowed_modes
245
+ self._count += 1
246
+ if self._gw_allowed_modes:
247
+ data["gateway_modes"] = self._gw_allowed_modes
248
+ self._count += 1
248
249
 
249
250
  def _climate_data(
250
251
  self,
plugwise/helper.py CHANGED
@@ -798,7 +798,9 @@ class SmileHelper(SmileCommon):
798
798
  # Techneco Elga has cooling-capability
799
799
  self._cooling_present = True
800
800
  data["model"] = "Generic heater/cooler"
801
- self._cooling_enabled = data["elga_status_code"] in (8, 9)
801
+ # Cooling_enabled in xml does NOT show the correct status!
802
+ # Setting it specifically:
803
+ self._cooling_enabled = data["binary_sensors"]["cooling_enabled"] = data["elga_status_code"] in (8, 9)
802
804
  data["binary_sensors"]["cooling_state"] = self._cooling_active = (
803
805
  data["elga_status_code"] == 8
804
806
  )
@@ -812,11 +814,13 @@ class SmileHelper(SmileCommon):
812
814
 
813
815
  def _update_loria_cooling(self, data: GwEntityData) -> None:
814
816
  """Loria/Thermastage: base cooling-related on cooling_state and modulation_level."""
815
- self._cooling_enabled = data["binary_sensors"]["cooling_state"]
817
+ # For Loria/Thermastage it's not clear if cooling_enabled in xml shows the correct status,
818
+ # setting it specifically:
819
+ self._cooling_enabled = data["binary_sensors"]["cooling_enabled"] = data["binary_sensors"]["cooling_state"]
816
820
  self._cooling_active = data["sensors"]["modulation_level"] == 100
817
821
  # For Loria the above does not work (pw-beta issue #301)
818
822
  if "cooling_ena_switch" in data["switches"]:
819
- self._cooling_enabled = data["switches"]["cooling_ena_switch"]
823
+ self._cooling_enabled = data["binary_sensors"]["cooling_enabled"] = data["switches"]["cooling_ena_switch"]
820
824
  self._cooling_active = data["binary_sensors"]["cooling_state"]
821
825
 
822
826
  def _cleanup_data(self, data: GwEntityData) -> None:
plugwise/smile.py CHANGED
@@ -131,6 +131,8 @@ class SmileAPI(SmileData):
131
131
  try:
132
132
  await self.full_xml_update()
133
133
  self.get_all_gateway_entities()
134
+ # Set self._cooling_enabled -required for set_temperature,
135
+ #also, check for a failed data-retrieval
134
136
  if "heater_id" in self.gw_data:
135
137
  heat_cooler = self.gw_entities[self.gw_data["heater_id"]]
136
138
  if (
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: plugwise
3
- Version: 1.6.2
3
+ Version: 1.6.3
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,17 +1,17 @@
1
1
  plugwise/__init__.py,sha256=GzkiJTPI0vFUIjGcIlvL_KS1lIHad_cOIKzCXwY3Eaw,17183
2
2
  plugwise/common.py,sha256=vyiAbn5SJgcL5A9DYIj2ixHBbPO_6EFa16bK1VJ3In4,13040
3
3
  plugwise/constants.py,sha256=yTR9uxFyWi0S5-KDtUGbtMI3eb2dGC3ekMxvL8X0qEY,17203
4
- plugwise/data.py,sha256=08QqLDUlK5vR49AqNT_rnqO2FoDwg5vdL5ClWtamUvQ,11856
4
+ plugwise/data.py,sha256=kFdmCW9UEX7mqdBoGWH6TCiwb7vzdm-es5ZMwJsdBQA,12095
5
5
  plugwise/exceptions.py,sha256=Ce-tO9uNsMB-8FP6VAxBvsHNJ-NIM9F0onUZOdZI4Ys,1110
6
- plugwise/helper.py,sha256=e-qd5C0U_N_g3Yyu6Kmc6Kvp0gDv9E-CoPShRmMQNAo,45414
6
+ plugwise/helper.py,sha256=v0sli2AE1s3ax0aAZoZw3Gmu7N9gImAol7S4l8FcuRY,45790
7
7
  plugwise/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- plugwise/smile.py,sha256=rY2KsANuHXgs5X_NzLP5kJQXscFnrCjGxrzyRiNqD74,18933
8
+ plugwise/smile.py,sha256=fyKo60PtOnW8bK3WpIu26R0mnXmHmsdjokTjVNS0j4A,19057
9
9
  plugwise/util.py,sha256=kt7JNcrTQaLT3eW_fzO4YmGsZzRull2Ge_OmHKl-rHk,8054
10
10
  plugwise/legacy/data.py,sha256=wHNcRQ_qF4A1rUdxn-1MoW1Z1gUwLqOvYvIkN6tJ_sk,3088
11
11
  plugwise/legacy/helper.py,sha256=ARIJytJNFiIR5G7Bp75DIULqgt56m0pxUXy6Ze8Te-4,18173
12
12
  plugwise/legacy/smile.py,sha256=RCQ0kHQwmPjq_G3r6aCe75RIvJt339jilzqEKydNopo,11286
13
- plugwise-1.6.2.dist-info/LICENSE,sha256=mL22BjmXtg_wnoDnnaqps5_Bg_VGj_yHueX5lsKwbCc,1144
14
- plugwise-1.6.2.dist-info/METADATA,sha256=uc4gSP0Z6oou5-kf8UsYQGe2mDqsWPTGvaJYqtXGUHE,9148
15
- plugwise-1.6.2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
16
- plugwise-1.6.2.dist-info/top_level.txt,sha256=MYOmktMFf8ZmX6_OE1y9MoCZFfY-L8DA0F2tA2IvE4s,9
17
- plugwise-1.6.2.dist-info/RECORD,,
13
+ plugwise-1.6.3.dist-info/LICENSE,sha256=mL22BjmXtg_wnoDnnaqps5_Bg_VGj_yHueX5lsKwbCc,1144
14
+ plugwise-1.6.3.dist-info/METADATA,sha256=OHR2k69qRTnfT8bl5jFpVRMiDDsnY7VCUgARvRKemCc,9148
15
+ plugwise-1.6.3.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
16
+ plugwise-1.6.3.dist-info/top_level.txt,sha256=MYOmktMFf8ZmX6_OE1y9MoCZFfY-L8DA0F2tA2IvE4s,9
17
+ plugwise-1.6.3.dist-info/RECORD,,