pypetkitapi 1.7.3__tar.gz → 1.7.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pypetkitapi
3
- Version: 1.7.3
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
@@ -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
- return PetkitEndpoint.GET_WORK_RECORD
101
+ if device_type == CTW3:
102
+ return PetkitEndpoint.GET_WORK_RECORD
103
+ return None
102
104
 
103
105
  @classmethod
104
106
  def query_param(
@@ -187,7 +187,7 @@ build-backend = "poetry.core.masonry.api"
187
187
 
188
188
  [tool.poetry]
189
189
  name = "pypetkitapi"
190
- version = "1.7.3"
190
+ version = "1.7.4"
191
191
  description = "Python client for PetKit API"
192
192
  authors = ["Jezza34000 <info@mail.com>"]
193
193
  readme = "README.md"
@@ -208,7 +208,7 @@ ruff = "^0.8.1"
208
208
  types-aiofiles = "^24.1.0.20240626"
209
209
 
210
210
  [tool.bumpver]
211
- current_version = "1.7.3"
211
+ current_version = "1.7.4"
212
212
  version_pattern = "MAJOR.MINOR.PATCH"
213
213
  commit_message = "bump version {old_version} -> {new_version}"
214
214
  tag_message = "{new_version}"
File without changes
File without changes