plugwise 1.1.0__tar.gz → 1.2.0__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.
- {plugwise-1.1.0 → plugwise-1.2.0}/PKG-INFO +1 -1
- {plugwise-1.1.0 → plugwise-1.2.0}/plugwise/data.py +6 -7
- {plugwise-1.1.0 → plugwise-1.2.0}/plugwise.egg-info/PKG-INFO +1 -1
- {plugwise-1.1.0 → plugwise-1.2.0}/pyproject.toml +2 -2
- {plugwise-1.1.0 → plugwise-1.2.0}/LICENSE +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/README.md +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/plugwise/__init__.py +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/plugwise/common.py +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/plugwise/constants.py +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/plugwise/exceptions.py +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/plugwise/helper.py +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/plugwise/legacy/data.py +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/plugwise/legacy/helper.py +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/plugwise/legacy/smile.py +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/plugwise/py.typed +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/plugwise/smile.py +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/plugwise/util.py +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/plugwise.egg-info/SOURCES.txt +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/plugwise.egg-info/dependency_links.txt +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/plugwise.egg-info/requires.txt +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/plugwise.egg-info/top_level.txt +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/setup.cfg +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/setup.py +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/tests/test_adam.py +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/tests/test_anna.py +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/tests/test_generic.py +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/tests/test_init.py +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/tests/test_legacy_anna.py +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/tests/test_legacy_generic.py +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/tests/test_legacy_p1.py +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/tests/test_legacy_stretch.py +0 -0
- {plugwise-1.1.0 → plugwise-1.2.0}/tests/test_p1.py +0 -0
@@ -62,15 +62,11 @@ class SmileData(SmileHelper):
|
|
62
62
|
self._add_or_update_notifications(device_id, device, data)
|
63
63
|
|
64
64
|
device.update(data)
|
65
|
-
|
66
65
|
is_battery_low = (
|
67
66
|
mac_list
|
68
67
|
and "low_battery" in device["binary_sensors"]
|
69
68
|
and device["zigbee_mac_address"] in mac_list
|
70
|
-
and (
|
71
|
-
(device["dev_class"] in ("thermo_sensor", "thermostatic_radiator_valve") and device["sensors"]["battery"] < 30)
|
72
|
-
or (device["dev_class"] in ("zone_thermometer", "zone_thermostat") and device["sensors"]["battery"] < 15)
|
73
|
-
)
|
69
|
+
and device["dev_class"] in ("thermo_sensor", "thermostatic_radiator_valve", "zone_thermometer", "zone_thermostat")
|
74
70
|
)
|
75
71
|
if is_battery_low:
|
76
72
|
device["binary_sensors"]["low_battery"] = True
|
@@ -88,12 +84,15 @@ class SmileData(SmileHelper):
|
|
88
84
|
for msg_id, notification in list(self._notifications.items()):
|
89
85
|
mac_address: str | None = None
|
90
86
|
message: str | None = notification.get("message")
|
91
|
-
|
87
|
+
warning: str | None = notification.get("warning")
|
88
|
+
notify = message or warning
|
89
|
+
if notify is not None and all(x in notify for x in matches) and (mac_addresses := mac_pattern.findall(notify)):
|
92
90
|
mac_address = mac_addresses[0] # re.findall() outputs a list
|
93
91
|
|
94
92
|
if mac_address is not None:
|
95
|
-
self._notifications.pop(msg_id)
|
96
93
|
mac_address_list.append(mac_address)
|
94
|
+
if message is not None: # only block message-type notifications
|
95
|
+
self._notifications.pop(msg_id)
|
97
96
|
|
98
97
|
return mac_address_list
|
99
98
|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
[build-system]
|
2
|
-
requires = ["setuptools~=
|
2
|
+
requires = ["setuptools~=73.0", "wheel~=0.44.0"]
|
3
3
|
build-backend = "setuptools.build_meta"
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "plugwise"
|
7
|
-
version = "1.
|
7
|
+
version = "1.2.0"
|
8
8
|
license = {file = "LICENSE"}
|
9
9
|
description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3."
|
10
10
|
readme = "README.md"
|
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
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|