plugwise 1.7.0__py3-none-any.whl → 1.7.1__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/__init__.py +2 -2
- plugwise/helper.py +2 -2
- plugwise/legacy/helper.py +2 -2
- plugwise/legacy/smile.py +1 -1
- plugwise/smile.py +1 -1
- plugwise/util.py +4 -4
- {plugwise-1.7.0.dist-info → plugwise-1.7.1.dist-info}/METADATA +1 -1
- plugwise-1.7.1.dist-info/RECORD +18 -0
- plugwise-1.7.0.dist-info/RECORD +0 -18
- {plugwise-1.7.0.dist-info → plugwise-1.7.1.dist-info}/LICENSE +0 -0
- {plugwise-1.7.0.dist-info → plugwise-1.7.1.dist-info}/WHEEL +0 -0
- {plugwise-1.7.0.dist-info → plugwise-1.7.1.dist-info}/top_level.txt +0 -0
plugwise/__init__.py
CHANGED
@@ -80,7 +80,7 @@ class Smile(SmileComm):
|
|
80
80
|
self.smile_model_id: str | None = None
|
81
81
|
self.smile_name: str = NONE
|
82
82
|
self.smile_type: str = NONE
|
83
|
-
self.smile_version: Version
|
83
|
+
self.smile_version: Version = Version("0.0.0")
|
84
84
|
self.smile_zigbee_mac_address: str | None = None
|
85
85
|
|
86
86
|
@property
|
@@ -115,7 +115,7 @@ class Smile(SmileComm):
|
|
115
115
|
"""
|
116
116
|
return not self.smile_legacy
|
117
117
|
|
118
|
-
async def connect(self) -> Version
|
118
|
+
async def connect(self) -> Version:
|
119
119
|
"""Connect to the Plugwise Gateway and determine its name, type, version, and other data."""
|
120
120
|
result = await self._request(DOMAIN_OBJECTS)
|
121
121
|
# Work-around for Stretch fw 2.7.18
|
plugwise/helper.py
CHANGED
@@ -86,7 +86,7 @@ class SmileHelper(SmileCommon):
|
|
86
86
|
self.smile_mac_address: str | None
|
87
87
|
self.smile_model: str
|
88
88
|
self.smile_model_id: str | None
|
89
|
-
self.smile_version: version.Version
|
89
|
+
self.smile_version: version.Version
|
90
90
|
SmileCommon.__init__(self)
|
91
91
|
|
92
92
|
def _all_appliances(self) -> None:
|
@@ -786,7 +786,7 @@ class SmileHelper(SmileCommon):
|
|
786
786
|
|
787
787
|
# Handle missing control_state in regulation_mode off for firmware >= 3.2.0 (issue #776)
|
788
788
|
# In newer firmware versions, default to "off" when control_state is not present
|
789
|
-
if self.smile_version
|
789
|
+
if self.smile_version != version.Version("0.0.0"):
|
790
790
|
if self.smile_version >= version.parse("3.2.0"):
|
791
791
|
return "off"
|
792
792
|
|
plugwise/legacy/helper.py
CHANGED
@@ -72,7 +72,7 @@ class SmileLegacyHelper(SmileCommon):
|
|
72
72
|
self.gw_entities: dict[str, GwEntityData] = {}
|
73
73
|
self.smile_mac_address: str | None
|
74
74
|
self.smile_model: str
|
75
|
-
self.smile_version: Version
|
75
|
+
self.smile_version: Version
|
76
76
|
self.smile_zigbee_mac_address: str | None
|
77
77
|
SmileCommon.__init__(self)
|
78
78
|
|
@@ -306,7 +306,7 @@ class SmileLegacyHelper(SmileCommon):
|
|
306
306
|
search = self._modules
|
307
307
|
mod_logs = search.findall("./module/services")
|
308
308
|
for loc.measurement, loc.attrs in P1_LEGACY_MEASUREMENTS.items():
|
309
|
-
loc.meas_list = loc.measurement.
|
309
|
+
loc.meas_list = loc.measurement.partition("_")[0::2]
|
310
310
|
for loc.logs in mod_logs:
|
311
311
|
for loc.log_type in mod_list:
|
312
312
|
collect_power_values(data, loc, t_string, legacy=True)
|
plugwise/legacy/smile.py
CHANGED
@@ -50,7 +50,7 @@ class SmileLegacyAPI(SmileLegacyData):
|
|
50
50
|
smile_model: str,
|
51
51
|
smile_name: str,
|
52
52
|
smile_type: str,
|
53
|
-
smile_version: Version
|
53
|
+
smile_version: Version,
|
54
54
|
smile_zigbee_mac_address: str | None,
|
55
55
|
) -> None:
|
56
56
|
"""Set the constructor for this class."""
|
plugwise/smile.py
CHANGED
@@ -59,7 +59,7 @@ class SmileAPI(SmileData):
|
|
59
59
|
smile_model_id: str | None,
|
60
60
|
smile_name: str,
|
61
61
|
smile_type: str,
|
62
|
-
smile_version: Version
|
62
|
+
smile_version: Version,
|
63
63
|
) -> None:
|
64
64
|
"""Set the constructor for this class."""
|
65
65
|
self._cooling_present = _cooling_present
|
plugwise/util.py
CHANGED
@@ -218,7 +218,7 @@ def get_vendor_name(module: etree, model_data: ModuleData) -> ModuleData:
|
|
218
218
|
if (vendor_name := module.find("vendor_name").text) is not None:
|
219
219
|
model_data["vendor_name"] = vendor_name
|
220
220
|
if "Plugwise" in vendor_name:
|
221
|
-
model_data["vendor_name"] = vendor_name.
|
221
|
+
model_data["vendor_name"] = vendor_name.partition(" ")[0]
|
222
222
|
|
223
223
|
return model_data
|
224
224
|
|
@@ -275,9 +275,9 @@ def power_data_peak_value(loc: Munch, legacy: bool) -> Munch:
|
|
275
275
|
if not loc.found:
|
276
276
|
return loc
|
277
277
|
|
278
|
-
if (peak := loc.peak_select.
|
278
|
+
if (peak := loc.peak_select.partition("_")[2]) == "offpeak":
|
279
279
|
peak = "off_peak"
|
280
|
-
log_found = loc.log_type.
|
280
|
+
log_found = loc.log_type.partition("_")[0]
|
281
281
|
loc.key_string = f"{loc.measurement}_{peak}_{log_found}"
|
282
282
|
if "gas" in loc.measurement or loc.log_type == "point_meter":
|
283
283
|
loc.key_string = f"{loc.measurement}_{log_found}"
|
@@ -314,7 +314,7 @@ def skip_obsolete_measurements(xml: etree, measurement: str) -> bool:
|
|
314
314
|
measurement in OBSOLETE_MEASUREMENTS
|
315
315
|
and (updated_date_key := xml.find(locator)) is not None
|
316
316
|
):
|
317
|
-
updated_date = updated_date_key.text.
|
317
|
+
updated_date = updated_date_key.text.partition("T")[0]
|
318
318
|
date_1 = dt.datetime.strptime(updated_date, "%Y-%m-%d")
|
319
319
|
date_2 = dt.datetime.now()
|
320
320
|
return int((date_2 - date_1).days) > 7
|
@@ -0,0 +1,18 @@
|
|
1
|
+
plugwise/__init__.py,sha256=hLwUqdGAo39LzTXYz6Lkua_9RelJx5k-uAeJSrZdfYk,17760
|
2
|
+
plugwise/common.py,sha256=_41FLLjgccaHjaV0Ndn1YEkxjB_qKev1k3ZnhSUzXjc,9305
|
3
|
+
plugwise/constants.py,sha256=Vd8tvOHsRtZxtUUFXBXolZj3QiKnxRt0bnwDT9DoEqE,17073
|
4
|
+
plugwise/data.py,sha256=ITGnS5RiRbd3O2KbYLc9_5okw81zLl7azXNXtuTwaoY,13022
|
5
|
+
plugwise/exceptions.py,sha256=Ce-tO9uNsMB-8FP6VAxBvsHNJ-NIM9F0onUZOdZI4Ys,1110
|
6
|
+
plugwise/helper.py,sha256=v8qXFau2bXnJ4xGde9NuljA-LLEWSL1SJVcnXQX-jiE,39397
|
7
|
+
plugwise/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
|
+
plugwise/smile.py,sha256=J8_CevN7FSYnAccYv4Hp_H3o9lfHGM_fYlLYAvuqJKw,18921
|
9
|
+
plugwise/smilecomm.py,sha256=aQ2KkebDTou18k-flrVmTnFkgls33Xu8D9ZZQQt2R5k,5178
|
10
|
+
plugwise/util.py,sha256=d3nOS9fzZ1MwJX8_77KOgW3CtQnGYc0oGcnqHrlxlLo,11015
|
11
|
+
plugwise/legacy/data.py,sha256=s2WYjgxwcuAGS8UOxJVf7xLSxS38Zgr8GsjxlxfD98w,3574
|
12
|
+
plugwise/legacy/helper.py,sha256=CjLGUhWRgNCOyooVyylLABdv0H2zoiKzjhQ-g7E8x9M,17059
|
13
|
+
plugwise/legacy/smile.py,sha256=aCG5uaOCS4GOGfIbxTp8U-CFE3Cib-UspB4qSamm_eY,11659
|
14
|
+
plugwise-1.7.1.dist-info/LICENSE,sha256=mL22BjmXtg_wnoDnnaqps5_Bg_VGj_yHueX5lsKwbCc,1144
|
15
|
+
plugwise-1.7.1.dist-info/METADATA,sha256=Dnc7KdcTcDjT33JYXSkkDkHXkxKHXEet2gXQcQpSuyo,9148
|
16
|
+
plugwise-1.7.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
17
|
+
plugwise-1.7.1.dist-info/top_level.txt,sha256=MYOmktMFf8ZmX6_OE1y9MoCZFfY-L8DA0F2tA2IvE4s,9
|
18
|
+
plugwise-1.7.1.dist-info/RECORD,,
|
plugwise-1.7.0.dist-info/RECORD
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
plugwise/__init__.py,sha256=fyot91I4cMkgo_8fL1hycRXwGBDecUq9ltxLAfSY-2U,17762
|
2
|
-
plugwise/common.py,sha256=_41FLLjgccaHjaV0Ndn1YEkxjB_qKev1k3ZnhSUzXjc,9305
|
3
|
-
plugwise/constants.py,sha256=Vd8tvOHsRtZxtUUFXBXolZj3QiKnxRt0bnwDT9DoEqE,17073
|
4
|
-
plugwise/data.py,sha256=ITGnS5RiRbd3O2KbYLc9_5okw81zLl7azXNXtuTwaoY,13022
|
5
|
-
plugwise/exceptions.py,sha256=Ce-tO9uNsMB-8FP6VAxBvsHNJ-NIM9F0onUZOdZI4Ys,1110
|
6
|
-
plugwise/helper.py,sha256=dsdPpwJHiZ3DQoTc7kWoOiFVPvRda5u1GRJwAEDxuBk,39388
|
7
|
-
plugwise/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
|
-
plugwise/smile.py,sha256=I8lssyqmq_PF8ptLxk3daS7lf20kXr5Z3L7SYg3S9j4,18928
|
9
|
-
plugwise/smilecomm.py,sha256=aQ2KkebDTou18k-flrVmTnFkgls33Xu8D9ZZQQt2R5k,5178
|
10
|
-
plugwise/util.py,sha256=7OPtC4FDbAweAqad6b-6tKtMlSSQd3OU7g5-0lplF34,11002
|
11
|
-
plugwise/legacy/data.py,sha256=s2WYjgxwcuAGS8UOxJVf7xLSxS38Zgr8GsjxlxfD98w,3574
|
12
|
-
plugwise/legacy/helper.py,sha256=GslPqZL0gAAnqJVy-Ydp_U-eGQ5jYhz9F_Y15BfQgt4,17056
|
13
|
-
plugwise/legacy/smile.py,sha256=TxjqRf7KIecECt48iHgSFI7bIOEHNkf4desSBVo1l-M,11666
|
14
|
-
plugwise-1.7.0.dist-info/LICENSE,sha256=mL22BjmXtg_wnoDnnaqps5_Bg_VGj_yHueX5lsKwbCc,1144
|
15
|
-
plugwise-1.7.0.dist-info/METADATA,sha256=ZWR9Mhkp1CknISTs1adzs9jePeIWqW9M89qMnUyvGI8,9148
|
16
|
-
plugwise-1.7.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
17
|
-
plugwise-1.7.0.dist-info/top_level.txt,sha256=MYOmktMFf8ZmX6_OE1y9MoCZFfY-L8DA0F2tA2IvE4s,9
|
18
|
-
plugwise-1.7.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|