pypetkitapi 1.12.0__tar.gz → 1.12.1__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.3
2
2
  Name: pypetkitapi
3
- Version: 1.12.0
3
+ Version: 1.12.1
4
4
  Summary: Python client for PetKit API
5
5
  License: MIT
6
6
  Author: Jezza34000
@@ -51,7 +51,7 @@ from .media import DownloadDecryptMedia, MediaCloud, MediaFile, MediaManager
51
51
  from .purifier_container import Purifier
52
52
  from .water_fountain_container import WaterFountain
53
53
 
54
- __version__ = "1.12.0"
54
+ __version__ = "1.12.1"
55
55
 
56
56
  __all__ = [
57
57
  "CTW3",
@@ -530,13 +530,17 @@ class PetKitClient:
530
530
  :param device_records: Litter data.
531
531
  """
532
532
  for stat in (
533
- s for s in device_records.device_records or [] if isinstance(s, LitterStats)
533
+ s
534
+ for s in device_records.device_records or []
535
+ if isinstance(s, LitterRecord)
534
536
  ):
535
537
  if stat.pet_id == pet.pet_id and (
536
538
  pet.last_litter_usage is None
537
539
  or self.get_safe_value(stat.timestamp) > pet.last_litter_usage
538
540
  ):
539
- pet.last_litter_usage = stat.timestamp
541
+ pet.last_litter_usage = (
542
+ stat.timestamp if stat.timestamp is not None else 0
543
+ )
540
544
  pet.last_measured_weight = self.get_safe_value(
541
545
  stat.content.pet_weight if stat.content else None
542
546
  )
@@ -187,7 +187,7 @@ build-backend = "poetry.core.masonry.api"
187
187
 
188
188
  [tool.poetry]
189
189
  name = "pypetkitapi"
190
- version = "1.12.0"
190
+ version = "1.12.1"
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.0"
212
+ current_version = "1.12.1"
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