pypetkitapi 1.12.3__tar.gz → 1.12.4__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.
- {pypetkitapi-1.12.3 → pypetkitapi-1.12.4}/PKG-INFO +1 -1
- {pypetkitapi-1.12.3 → pypetkitapi-1.12.4}/pypetkitapi/__init__.py +1 -1
- {pypetkitapi-1.12.3 → pypetkitapi-1.12.4}/pypetkitapi/bluetooth.py +19 -4
- {pypetkitapi-1.12.3 → pypetkitapi-1.12.4}/pypetkitapi/media.py +1 -1
- {pypetkitapi-1.12.3 → pypetkitapi-1.12.4}/pyproject.toml +2 -2
- {pypetkitapi-1.12.3 → pypetkitapi-1.12.4}/LICENSE +0 -0
- {pypetkitapi-1.12.3 → pypetkitapi-1.12.4}/README.md +0 -0
- {pypetkitapi-1.12.3 → pypetkitapi-1.12.4}/pypetkitapi/client.py +0 -0
- {pypetkitapi-1.12.3 → pypetkitapi-1.12.4}/pypetkitapi/command.py +0 -0
- {pypetkitapi-1.12.3 → pypetkitapi-1.12.4}/pypetkitapi/const.py +0 -0
- {pypetkitapi-1.12.3 → pypetkitapi-1.12.4}/pypetkitapi/containers.py +0 -0
- {pypetkitapi-1.12.3 → pypetkitapi-1.12.4}/pypetkitapi/exceptions.py +0 -0
- {pypetkitapi-1.12.3 → pypetkitapi-1.12.4}/pypetkitapi/feeder_container.py +0 -0
- {pypetkitapi-1.12.3 → pypetkitapi-1.12.4}/pypetkitapi/litter_container.py +0 -0
- {pypetkitapi-1.12.3 → pypetkitapi-1.12.4}/pypetkitapi/purifier_container.py +0 -0
- {pypetkitapi-1.12.3 → pypetkitapi-1.12.4}/pypetkitapi/py.typed +0 -0
- {pypetkitapi-1.12.3 → pypetkitapi-1.12.4}/pypetkitapi/schedule_container.py +0 -0
- {pypetkitapi-1.12.3 → pypetkitapi-1.12.4}/pypetkitapi/utils.py +0 -0
- {pypetkitapi-1.12.3 → pypetkitapi-1.12.4}/pypetkitapi/water_fountain_container.py +0 -0
@@ -41,6 +41,9 @@ class BluetoothManager:
|
|
41
41
|
if not isinstance(water_fountain, WaterFountain):
|
42
42
|
_LOGGER.error("Water fountain with ID %s not found.", fountain_id)
|
43
43
|
raise TypeError(f"Water fountain with ID {fountain_id} not found.")
|
44
|
+
if water_fountain.device_nfo is None:
|
45
|
+
raise ValueError(f"Device info not found for fountain {fountain_id}")
|
46
|
+
|
44
47
|
return water_fountain
|
45
48
|
|
46
49
|
async def check_relay_availability(self, fountain_id: int) -> bool:
|
@@ -94,7 +97,11 @@ class BluetoothManager:
|
|
94
97
|
response = await self.client.req.request(
|
95
98
|
method=HTTPMethod.POST,
|
96
99
|
url=PetkitEndpoint.BLE_CONNECT,
|
97
|
-
data={
|
100
|
+
data={
|
101
|
+
"bleId": fountain_id,
|
102
|
+
"type": water_fountain.device_nfo.type, # type: ignore[union-attr]
|
103
|
+
"mac": water_fountain.mac,
|
104
|
+
},
|
98
105
|
headers=await self.client.get_session_id(),
|
99
106
|
)
|
100
107
|
if response != {"state": 1}:
|
@@ -111,7 +118,11 @@ class BluetoothManager:
|
|
111
118
|
response = await self.client.req.request(
|
112
119
|
method=HTTPMethod.POST,
|
113
120
|
url=PetkitEndpoint.BLE_POLL,
|
114
|
-
data={
|
121
|
+
data={
|
122
|
+
"bleId": fountain_id,
|
123
|
+
"type": water_fountain.device_nfo.type, # type: ignore[union-attr]
|
124
|
+
"mac": water_fountain.mac,
|
125
|
+
},
|
115
126
|
headers=await self.client.get_session_id(),
|
116
127
|
)
|
117
128
|
if response == 1:
|
@@ -149,7 +160,11 @@ class BluetoothManager:
|
|
149
160
|
await self.client.req.request(
|
150
161
|
method=HTTPMethod.POST,
|
151
162
|
url=PetkitEndpoint.BLE_CANCEL,
|
152
|
-
data={
|
163
|
+
data={
|
164
|
+
"bleId": fountain_id,
|
165
|
+
"type": water_fountain.device_nfo.type, # type: ignore[union-attr]
|
166
|
+
"mac": water_fountain.mac,
|
167
|
+
},
|
153
168
|
headers=await self.client.get_session_id(),
|
154
169
|
)
|
155
170
|
_LOGGER.debug("BLE connection closed successfully (id %s)", fountain_id)
|
@@ -206,7 +221,7 @@ class BluetoothManager:
|
|
206
221
|
"cmd": cmd_code,
|
207
222
|
"data": cmd_data,
|
208
223
|
"mac": water_fountain.mac,
|
209
|
-
"type":
|
224
|
+
"type": water_fountain.device_nfo.type, # type: ignore[union-attr]
|
210
225
|
},
|
211
226
|
headers=await self.client.get_session_id(),
|
212
227
|
)
|
@@ -322,7 +322,7 @@ class MediaManager:
|
|
322
322
|
cp_sub = self.is_subscription_active(device_obj)
|
323
323
|
|
324
324
|
if not feeder_id or not record.items:
|
325
|
-
_LOGGER.
|
325
|
+
_LOGGER.debug("Missing feeder_id or items for record")
|
326
326
|
return media_files
|
327
327
|
|
328
328
|
for item in record.items:
|
@@ -187,7 +187,7 @@ build-backend = "poetry.core.masonry.api"
|
|
187
187
|
|
188
188
|
[tool.poetry]
|
189
189
|
name = "pypetkitapi"
|
190
|
-
version = "1.12.
|
190
|
+
version = "1.12.4"
|
191
191
|
description = "Python client for PetKit API"
|
192
192
|
authors = ["Jezza34000 <info@mail.com>"]
|
193
193
|
readme = "README.md"
|
@@ -209,7 +209,7 @@ ruff = "^0.8.1"
|
|
209
209
|
types-aiofiles = "^24.1.0.20240626"
|
210
210
|
|
211
211
|
[tool.bumpver]
|
212
|
-
current_version = "1.12.
|
212
|
+
current_version = "1.12.4"
|
213
213
|
version_pattern = "MAJOR.MINOR.PATCH"
|
214
214
|
commit_message = "bump version {old_version} -> {new_version}"
|
215
215
|
tag_message = "{new_version}"
|
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
|