pypetkitapi 1.7.1__py3-none-any.whl → 1.7.4__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.
- pypetkitapi/client.py +4 -0
- pypetkitapi/water_fountain_container.py +5 -3
- {pypetkitapi-1.7.1.dist-info → pypetkitapi-1.7.4.dist-info}/METADATA +3 -2
- {pypetkitapi-1.7.1.dist-info → pypetkitapi-1.7.4.dist-info}/RECORD +6 -6
- {pypetkitapi-1.7.1.dist-info → pypetkitapi-1.7.4.dist-info}/LICENSE +0 -0
- {pypetkitapi-1.7.1.dist-info → pypetkitapi-1.7.4.dist-info}/WHEEL +0 -0
pypetkitapi/client.py
CHANGED
@@ -270,6 +270,10 @@ class PetKitClient:
|
|
270
270
|
|
271
271
|
endpoint = data_class.get_endpoint(device_type)
|
272
272
|
|
273
|
+
if endpoint is None:
|
274
|
+
_LOGGER.debug("Endpoint not found for device type: %s", device_type)
|
275
|
+
return
|
276
|
+
|
273
277
|
# Specific device ask for data from the device
|
274
278
|
device_cont = None
|
275
279
|
if self.petkit_entities.get(device.device_id, None):
|
@@ -5,7 +5,7 @@ from typing import Any, ClassVar
|
|
5
5
|
|
6
6
|
from pydantic import BaseModel, Field
|
7
7
|
|
8
|
-
from pypetkitapi.const import DEVICE_DATA, DEVICE_RECORDS, PetkitEndpoint
|
8
|
+
from pypetkitapi.const import CTW3, DEVICE_DATA, DEVICE_RECORDS, PetkitEndpoint
|
9
9
|
from pypetkitapi.containers import Device
|
10
10
|
|
11
11
|
|
@@ -96,9 +96,11 @@ class WaterFountainRecord(BaseModel):
|
|
96
96
|
device_type: str | None = Field(None, alias="deviceType")
|
97
97
|
|
98
98
|
@classmethod
|
99
|
-
def get_endpoint(cls, device_type: str) -> str:
|
99
|
+
def get_endpoint(cls, device_type: str) -> str | None:
|
100
100
|
"""Get the endpoint URL for the given device type."""
|
101
|
-
|
101
|
+
if device_type == CTW3:
|
102
|
+
return PetkitEndpoint.GET_WORK_RECORD
|
103
|
+
return None
|
102
104
|
|
103
105
|
@classmethod
|
104
106
|
def query_param(
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pypetkitapi
|
3
|
-
Version: 1.7.
|
3
|
+
Version: 1.7.4
|
4
4
|
Summary: Python client for PetKit API
|
5
5
|
Home-page: https://github.com/Jezza34000/pypetkit
|
6
6
|
License: MIT
|
@@ -12,7 +12,8 @@ Classifier: Programming Language :: Python :: 3
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.11
|
13
13
|
Classifier: Programming Language :: Python :: 3.12
|
14
14
|
Classifier: Programming Language :: Python :: 3.13
|
15
|
-
Requires-Dist:
|
15
|
+
Requires-Dist: aiofiles (>=24.1.0,<25.0.0)
|
16
|
+
Requires-Dist: aiohttp (>=3.10.10,<4.0.0)
|
16
17
|
Requires-Dist: pycryptodome (>=3.19.1,<4.0.0)
|
17
18
|
Requires-Dist: pydantic (>=1.10.19,<2.0.0)
|
18
19
|
Description-Content-Type: text/markdown
|
@@ -1,5 +1,5 @@
|
|
1
1
|
pypetkitapi/__init__.py,sha256=eVpyGMD3tkYtiHUkdKEeNSZhQlZ4woI2Y5oVoV7CwXM,61
|
2
|
-
pypetkitapi/client.py,sha256=
|
2
|
+
pypetkitapi/client.py,sha256=h2HMfUSlfa5ppGn7ev3VVxlv0-T7FCqHGGDyP6DoNBw,19751
|
3
3
|
pypetkitapi/command.py,sha256=gw3_J_oZHuuGLk66P8uRSqSrySjYa8ArpKaPHi2ybCw,7155
|
4
4
|
pypetkitapi/const.py,sha256=9XNLhM9k0GwNmWPgGef5roULpsYVZ7hzxptGgNhjs74,3432
|
5
5
|
pypetkitapi/containers.py,sha256=8HA2LEzHga062LcC08c9JCowyDRmjjf8en4ImZ6tg_4,4352
|
@@ -8,8 +8,8 @@ pypetkitapi/feeder_container.py,sha256=28GXZ8Nbs08PnFZZI4ENBe3UJ63gsXT3rFa151KrP
|
|
8
8
|
pypetkitapi/litter_container.py,sha256=fTPHa5VQvM6Ycm-XIeu3N1E6dTI4g1zEqC-o23sxdhE,18068
|
9
9
|
pypetkitapi/medias.py,sha256=1Nso1YZK_Bz4MrSuQ_zjawoyg5KqO_JoBSQaMmvh6Jo,7216
|
10
10
|
pypetkitapi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
|
-
pypetkitapi/water_fountain_container.py,sha256=
|
12
|
-
pypetkitapi-1.7.
|
13
|
-
pypetkitapi-1.7.
|
14
|
-
pypetkitapi-1.7.
|
15
|
-
pypetkitapi-1.7.
|
11
|
+
pypetkitapi/water_fountain_container.py,sha256=3F4GP5pXJqq6kxLMSK__GgFMuZ-rz1VDIIhaVd19Kl8,6781
|
12
|
+
pypetkitapi-1.7.4.dist-info/LICENSE,sha256=4FWnKolNLc1e3w6cVlT61YxfPh0DQNeQLN1CepKKSBg,1067
|
13
|
+
pypetkitapi-1.7.4.dist-info/METADATA,sha256=zOLLrY09rRjinO6hen7UAiBhi1diVDMz3ISu9ywTB04,4852
|
14
|
+
pypetkitapi-1.7.4.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
15
|
+
pypetkitapi-1.7.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|