pypetkitapi 1.12.0__py3-none-any.whl → 1.12.1__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/__init__.py CHANGED
@@ -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",
pypetkitapi/client.py CHANGED
@@ -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
  )
@@ -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
@@ -1,6 +1,6 @@
1
- pypetkitapi/__init__.py,sha256=8P_Q3nbGmbt01e6ghbuxJ8Z6hjm4sykosi-tO-UPEGA,2107
1
+ pypetkitapi/__init__.py,sha256=T4726e-xkLSV7y0cs9BXcEebn6vm4dLV2_96YqjmJ0k,2107
2
2
  pypetkitapi/bluetooth.py,sha256=JIj6mA5D1ZUUFSvnYco1XiGDbF4exKIU50zQIJMXLII,8976
3
- pypetkitapi/client.py,sha256=rPiB96ZX8-X5W6Zr8cPS8guJqhq8b1apBTz55XTfJMY,29658
3
+ pypetkitapi/client.py,sha256=9K95_UuuBBsMYAssN8QrtLnS27IPso4Rnvn663RRs5Y,29760
4
4
  pypetkitapi/command.py,sha256=cMCUutZCQo9Ddvjl_FYR5UjU_CqFz1iyetMznYwjpzM,7500
5
5
  pypetkitapi/const.py,sha256=W0cWpBvOySEaPvVAnQHLeIWYEqKG051mVNv-qsfjo7I,4609
6
6
  pypetkitapi/containers.py,sha256=F_uyDBD0a5QD4s_ArjYiKTAAg1XHYBvmV_lEnO9RQ-U,4786
@@ -13,7 +13,7 @@ pypetkitapi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  pypetkitapi/schedule_container.py,sha256=ycIHeQHkVILDp7ZBjaVdGI_9rhHrgqeKBfvQAX3JMGE,2071
14
14
  pypetkitapi/utils.py,sha256=z7325kcJQUburnF28HSXrJMvY_gY9007K73Zwxp-4DQ,743
15
15
  pypetkitapi/water_fountain_container.py,sha256=5J0b-fDZYcFLNX2El7fifv8H6JMhBCt-ttxSow1ozRQ,6787
16
- pypetkitapi-1.12.0.dist-info/LICENSE,sha256=u5jNkZEn6YMrtN4Kr5rU3TcBJ5-eAt0qMx4JDsbsnzM,1074
17
- pypetkitapi-1.12.0.dist-info/METADATA,sha256=Tl8kDjls1WDL14E466hKpL8zKRrRQAIqc7zRTlXBuuY,6946
18
- pypetkitapi-1.12.0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
19
- pypetkitapi-1.12.0.dist-info/RECORD,,
16
+ pypetkitapi-1.12.1.dist-info/LICENSE,sha256=u5jNkZEn6YMrtN4Kr5rU3TcBJ5-eAt0qMx4JDsbsnzM,1074
17
+ pypetkitapi-1.12.1.dist-info/METADATA,sha256=zn4bNIG96NlL3PQ87aTIaSMo0VDXW4eru8ZbeXFyphE,6946
18
+ pypetkitapi-1.12.1.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
19
+ pypetkitapi-1.12.1.dist-info/RECORD,,