pypetkitapi 1.13.0__py3-none-any.whl → 1.16.0__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 +1 -1
- pypetkitapi/client.py +27 -1
- pypetkitapi/command.py +6 -4
- pypetkitapi/const.py +1 -1
- pypetkitapi/containers.py +38 -1
- pypetkitapi/litter_container.py +67 -52
- {pypetkitapi-1.13.0.dist-info → pypetkitapi-1.16.0.dist-info}/METADATA +29 -2
- {pypetkitapi-1.13.0.dist-info → pypetkitapi-1.16.0.dist-info}/RECORD +10 -10
- {pypetkitapi-1.13.0.dist-info → pypetkitapi-1.16.0.dist-info}/WHEEL +1 -1
- {pypetkitapi-1.13.0.dist-info → pypetkitapi-1.16.0.dist-info}/LICENSE +0 -0
pypetkitapi/__init__.py
CHANGED
pypetkitapi/client.py
CHANGED
@@ -38,7 +38,14 @@ from pypetkitapi.const import (
|
|
38
38
|
PetkitDomain,
|
39
39
|
PetkitEndpoint,
|
40
40
|
)
|
41
|
-
from pypetkitapi.containers import
|
41
|
+
from pypetkitapi.containers import (
|
42
|
+
AccountData,
|
43
|
+
Device,
|
44
|
+
Pet,
|
45
|
+
PetDetails,
|
46
|
+
RegionInfo,
|
47
|
+
SessionInfo,
|
48
|
+
)
|
42
49
|
from pypetkitapi.exceptions import (
|
43
50
|
PetkitAuthenticationError,
|
44
51
|
PetkitAuthenticationUnregisteredEmailError,
|
@@ -227,6 +234,18 @@ class PetKitClient:
|
|
227
234
|
raise PetkitSessionError("No session ID available")
|
228
235
|
return {"F-Session": self._session.id, "X-Session": self._session.id}
|
229
236
|
|
237
|
+
async def _get_pet_details(self) -> list[PetDetails]:
|
238
|
+
"""Fetch pet details from the PetKit API."""
|
239
|
+
_LOGGER.debug("Fetching user details")
|
240
|
+
response = await self.req.request(
|
241
|
+
method=HTTPMethod.GET,
|
242
|
+
url=PetkitEndpoint.DETAILS,
|
243
|
+
headers=await self.get_session_id(),
|
244
|
+
)
|
245
|
+
user_details = response.get("user", {})
|
246
|
+
dogs = user_details.get("dogs", [])
|
247
|
+
return [PetDetails(**dog) for dog in dogs]
|
248
|
+
|
230
249
|
async def _get_account_data(self) -> None:
|
231
250
|
"""Get the account data from the PetKit service."""
|
232
251
|
_LOGGER.debug("Fetching account data")
|
@@ -253,6 +272,13 @@ class PetKitClient:
|
|
253
272
|
uniqueId=str(pet.sn),
|
254
273
|
)
|
255
274
|
|
275
|
+
# Fetch pet details and update pet information
|
276
|
+
pet_details_list = await self._get_pet_details()
|
277
|
+
for pet_details in pet_details_list:
|
278
|
+
pet_id = pet_details.id
|
279
|
+
if pet_id in self.petkit_entities:
|
280
|
+
self.petkit_entities[pet_id].pet_details = pet_details
|
281
|
+
|
256
282
|
async def get_devices_data(self) -> None:
|
257
283
|
"""Get the devices data from the PetKit servers."""
|
258
284
|
start_time = datetime.now()
|
pypetkitapi/command.py
CHANGED
@@ -57,7 +57,8 @@ class FeederCommand(StrEnum):
|
|
57
57
|
class LitterCommand(StrEnum):
|
58
58
|
"""Specific LitterCommand"""
|
59
59
|
|
60
|
-
|
60
|
+
RESET_N50_DEODORIZER = "reset_deodorizer"
|
61
|
+
# T5/T6 N60 does not have this command, must use control_device
|
61
62
|
|
62
63
|
|
63
64
|
class PetCommand(StrEnum):
|
@@ -71,14 +72,15 @@ class LBCommand(IntEnum):
|
|
71
72
|
|
72
73
|
CLEANING = 0
|
73
74
|
DUMPING = 1
|
74
|
-
ODOR_REMOVAL = 2
|
75
|
+
ODOR_REMOVAL = 2 # For T4=K3 spray, for T5/T6=N60 fan
|
75
76
|
RESETTING = 3
|
76
77
|
LEVELING = 4
|
77
78
|
CALIBRATING = 5
|
78
79
|
RESET_DEODOR = 6
|
79
80
|
LIGHT = 7
|
80
|
-
|
81
|
+
RESET_N50_DEODOR = 8
|
81
82
|
MAINTENANCE = 9
|
83
|
+
RESET_N60_DEODOR = 10
|
82
84
|
|
83
85
|
|
84
86
|
class PurMode(IntEnum):
|
@@ -251,7 +253,7 @@ ACTIONS_MAP = {
|
|
251
253
|
},
|
252
254
|
supported_device=DEVICES_FEEDER,
|
253
255
|
),
|
254
|
-
LitterCommand.
|
256
|
+
LitterCommand.RESET_N50_DEODORIZER: CmdData(
|
255
257
|
endpoint=PetkitEndpoint.DEODORANT_RESET,
|
256
258
|
params=lambda device: {
|
257
259
|
"deviceId": device.id,
|
pypetkitapi/const.py
CHANGED
@@ -166,7 +166,7 @@ class PetkitEndpoint(StrEnum):
|
|
166
166
|
GET_WORK_RECORD = "getWorkRecord"
|
167
167
|
|
168
168
|
# Litter Box
|
169
|
-
DEODORANT_RESET = "deodorantReset"
|
169
|
+
DEODORANT_RESET = "deodorantReset" # For N50 only
|
170
170
|
STATISTIC = "statistic"
|
171
171
|
STATISTIC_RELEASE = "statisticRelease"
|
172
172
|
GET_PET_OUT_GRAPH = "getPetOutGraph"
|
pypetkitapi/containers.py
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
"""Dataclasses container for petkit API."""
|
2
2
|
|
3
|
+
from typing import Any
|
4
|
+
|
3
5
|
from pydantic import BaseModel, Field, field_validator
|
4
6
|
|
5
7
|
|
@@ -68,6 +70,40 @@ class Device(BaseModel):
|
|
68
70
|
return value
|
69
71
|
|
70
72
|
|
73
|
+
class PetDetails(BaseModel):
|
74
|
+
"""Dataclass for pet details.
|
75
|
+
Subclass of Pet.
|
76
|
+
"""
|
77
|
+
|
78
|
+
active_degree: int | None = Field(None, alias="activeDegree")
|
79
|
+
avatar: str | None = None
|
80
|
+
birth: str | None = None
|
81
|
+
block_time: int | None = Field(None, alias="blockTime")
|
82
|
+
blocke: int | None = None
|
83
|
+
body_info: dict[str, Any] | None = Field(None, alias="bodyInfo")
|
84
|
+
category: dict[str, Any]
|
85
|
+
created_at: str | None = Field(None, alias="createdAt")
|
86
|
+
device_count: int | None = Field(None, alias="deviceCount")
|
87
|
+
emotion: int | None = None
|
88
|
+
family_id: int | None = Field(None, alias="familyId")
|
89
|
+
female_state: int | None = Field(None, alias="femaleState")
|
90
|
+
gender: int | None = None
|
91
|
+
id: int | None = None
|
92
|
+
is_royal_canin_pet: int | None = Field(None, alias="isRoyalCaninPet")
|
93
|
+
male_state: int | None = Field(None, alias="maleState")
|
94
|
+
name: str | None = None
|
95
|
+
oms_discern_pic: dict[str, Any] | None = Field(None, alias="omsDiscernPic")
|
96
|
+
owner: dict[str, Any] | None = None
|
97
|
+
size: dict[str, Any] | None = None
|
98
|
+
states: list[Any] | None = None
|
99
|
+
type: dict[str, Any] | None = None
|
100
|
+
updated_at: str | None = Field(None, alias="updatedAt")
|
101
|
+
weight: float | None = None
|
102
|
+
weight_control: int | None = Field(None, alias="weightControl")
|
103
|
+
weight_control_tips: dict[str, Any] | None = Field(None, alias="weightControlTips")
|
104
|
+
weight_label: str | None = Field(None, alias="weightLabel")
|
105
|
+
|
106
|
+
|
71
107
|
class Pet(BaseModel):
|
72
108
|
"""Dataclass for pet data.
|
73
109
|
Subclass of AccountData.
|
@@ -81,7 +117,8 @@ class Pet(BaseModel):
|
|
81
117
|
sn: str | None = None # Fictive field copied from id (for HA compatibility)
|
82
118
|
name: str | None = None # Fictive field copied from pet_name (for HA compatibility)
|
83
119
|
firmware: str | None = None # Fictive fixed field (for HA compatibility)
|
84
|
-
device_nfo: Device | None = None
|
120
|
+
device_nfo: Device | None = None
|
121
|
+
pet_details: PetDetails | None = None
|
85
122
|
|
86
123
|
# Litter stats
|
87
124
|
last_litter_usage: int | None = None
|
pypetkitapi/litter_container.py
CHANGED
@@ -30,12 +30,21 @@ class SettingsLitter(BaseModel):
|
|
30
30
|
"""
|
31
31
|
|
32
32
|
auto_interval_min: int | None = Field(None, alias="autoIntervalMin")
|
33
|
+
auto_interval_spray: int | None = Field(None, alias="autoIntervalSpray")
|
34
|
+
auto_product: int | None = Field(None, alias="autoProduct")
|
35
|
+
auto_spray: int | None = Field(None, alias="autoSpray")
|
33
36
|
auto_work: int | None = Field(None, alias="autoWork")
|
34
37
|
avoid_repeat: int | None = Field(None, alias="avoidRepeat")
|
35
38
|
bury: int | None = None
|
39
|
+
camera: int | None = None
|
40
|
+
camera_config: int | None = Field(None, alias="cameraConfig")
|
41
|
+
camera_light: int | None = Field(None, alias="cameraLight")
|
42
|
+
cleanning_notify: int | None = Field(None, alias="cleanningNotify")
|
43
|
+
click_ok_enable: int | None = Field(None, alias="clickOkEnable")
|
36
44
|
control_settings: int | None = Field(None, alias="controlSettings")
|
37
45
|
deep_clean: int | None = Field(None, alias="deepClean")
|
38
46
|
deep_refresh: int | None = Field(None, alias="deepRefresh")
|
47
|
+
deep_spray: int | None = Field(None, alias="deepSpray")
|
39
48
|
deodorant_notify: int | None = Field(None, alias="deodorantNotify")
|
40
49
|
distrub_multi_range: list[list[int]] | None = Field(None, alias="distrubMultiRange")
|
41
50
|
disturb_config: int | None = Field(None, alias="disturbConfig")
|
@@ -44,6 +53,9 @@ class SettingsLitter(BaseModel):
|
|
44
53
|
downpos: int | None = None
|
45
54
|
dump_switch: int | None = Field(None, alias="dumpSwitch")
|
46
55
|
fixed_time_clear: int | None = Field(None, alias="fixedTimeClear")
|
56
|
+
fixed_time_spray: int | None = Field(None, alias="fixedTimeSpray")
|
57
|
+
garbage_notify: int | None = Field(None, alias="garbageNotify")
|
58
|
+
highlight: int | None = Field(None, alias="highlight")
|
47
59
|
kitten: int | None = None
|
48
60
|
kitten_percent: float | None = Field(None, alias="kittenPercent")
|
49
61
|
kitten_tips_time: int | None = Field(None, alias="kittenTipsTime")
|
@@ -52,39 +64,30 @@ class SettingsLitter(BaseModel):
|
|
52
64
|
language: str | None = None
|
53
65
|
language_follow: int | None = Field(None, alias="languageFollow")
|
54
66
|
languages: list[str] | None = None
|
67
|
+
light_assist: int | None = Field(None, alias="lightAssist")
|
55
68
|
light_config: int | None = Field(None, alias="lightConfig")
|
56
69
|
light_mode: int | None = Field(None, alias="lightMode")
|
57
70
|
light_multi_range: list[Any] | None = Field(None, alias="lightMultiRange")
|
58
71
|
light_range: list[int] | None = Field(None, alias="lightRange")
|
59
72
|
lightest: int | None = Field(None, alias="lightest")
|
60
73
|
litter_full_notify: int | None = Field(None, alias="litterFullNotify")
|
61
|
-
manual_lock: int | None = Field(None, alias="manualLock")
|
62
|
-
no_remind: int | None = Field(None, alias="noRemind")
|
63
|
-
pet_in_notify: int | None = Field(None, alias="petInNotify")
|
64
|
-
relate_k3_switch: int | None = Field(None, alias="relateK3Switch")
|
65
|
-
sand_type: int | None = Field(None, alias="sandType")
|
66
|
-
soft_mode: int | None = Field(None, alias="softMode")
|
67
|
-
still_time: int | None = Field(None, alias="stillTime")
|
68
|
-
stop_time: int | None = Field(None, alias="stopTime")
|
69
|
-
underweight: int | None = Field(None, alias="underweight")
|
70
|
-
unit: int | None = None
|
71
|
-
weight_popup: int | None = Field(None, alias="weightPopup")
|
72
|
-
work_notify: int | None = Field(None, alias="workNotify")
|
73
|
-
auto_product: int | None = Field(None, alias="autoProduct")
|
74
|
-
camera: int | None = None
|
75
|
-
camera_config: int | None = Field(None, alias="cameraConfig")
|
76
|
-
cleanning_notify: int | None = Field(None, alias="cleanningNotify")
|
77
|
-
garbage_notify: int | None = Field(None, alias="garbageNotify")
|
78
|
-
highlight: int | None = Field(None, alias="highlight")
|
79
|
-
light_assist: int | None = Field(None, alias="lightAssist")
|
80
74
|
live_encrypt: int | None = Field(None, alias="liveEncrypt")
|
75
|
+
manual_lock: int | None = Field(None, alias="manualLock")
|
81
76
|
microphone: int | None = None
|
82
77
|
move_notify: int | None = Field(None, alias="moveNotify")
|
83
78
|
night: int | None = None
|
79
|
+
no_remind: int | None = Field(None, alias="noRemind")
|
84
80
|
package_standard: list[int] | None = Field(None, alias="packageStandard")
|
85
81
|
pet_detection: int | None = Field(None, alias="petDetection")
|
82
|
+
pet_in_notify: int | None = Field(None, alias="petInNotify")
|
86
83
|
pet_notify: int | None = Field(None, alias="petNotify")
|
87
84
|
pre_live: int | None = Field(None, alias="preLive")
|
85
|
+
relate_k3_switch: int | None = Field(None, alias="relateK3Switch")
|
86
|
+
sand_type: int | None = Field(None, alias="sandType")
|
87
|
+
soft_mode: int | None = Field(None, alias="softMode")
|
88
|
+
spray_notify: int | None = Field(None, alias="sprayNotify")
|
89
|
+
still_time: int | None = Field(None, alias="stillTime")
|
90
|
+
stop_time: int | None = Field(None, alias="stopTime")
|
88
91
|
system_sound_enable: int | None = Field(None, alias="systemSoundEnable")
|
89
92
|
time_display: int | None = Field(None, alias="timeDisplay")
|
90
93
|
toilet_detection: int | None = Field(None, alias="toiletDetection")
|
@@ -93,9 +96,13 @@ class SettingsLitter(BaseModel):
|
|
93
96
|
tone_mode: int | None = Field(None, alias="toneMode")
|
94
97
|
tone_multi_range: list[list[int]] | None = Field(None, alias="toneMultiRange")
|
95
98
|
tumbling: int | None = None
|
99
|
+
underweight: int | None = Field(None, alias="underweight")
|
100
|
+
unit: int | None = None
|
96
101
|
upload: int | None = None
|
97
102
|
volume: int | None = None
|
98
103
|
wander_detection: int | None = Field(None, alias="wanderDetection")
|
104
|
+
weight_popup: int | None = Field(None, alias="weightPopup")
|
105
|
+
work_notify: int | None = Field(None, alias="workNotify")
|
99
106
|
|
100
107
|
|
101
108
|
class WorkState(BaseModel):
|
@@ -114,51 +121,57 @@ class StateLitter(BaseModel):
|
|
114
121
|
-> LitterData subclass.
|
115
122
|
"""
|
116
123
|
|
124
|
+
bagging_state: int | None = Field(None, alias="baggingState")
|
125
|
+
battery: int | None = None
|
117
126
|
box: int | None = None
|
118
127
|
box_full: bool | None = Field(None, alias="boxFull")
|
119
128
|
box_state: int | None = Field(None, alias="boxState")
|
129
|
+
box_store_state: int | None = Field(None, alias="boxStoreState")
|
130
|
+
camera_status: int | None = Field(None, alias="cameraStatus")
|
120
131
|
deodorant_left_days: int | None = Field(None, alias="deodorantLeftDays")
|
132
|
+
dump_state: int | None = Field(None, alias="dumpState")
|
121
133
|
error_code: str | None = Field(None, alias="errorCode")
|
122
134
|
error_detail: str | None = Field(None, alias="errorDetail")
|
123
135
|
error_level: int | None = Field(None, alias="errorLevel")
|
124
136
|
error_msg: str | None = Field(None, alias="errorMsg")
|
125
137
|
frequent_restroom: int | None = Field(None, alias="frequentRestroom")
|
138
|
+
liquid: int | None = None
|
126
139
|
liquid_empty: bool | None = Field(None, alias="liquidEmpty")
|
127
140
|
liquid_lack: bool | None = Field(None, alias="liquidLack")
|
128
141
|
liquid_reset: int | None = Field(None, alias="liquidReset")
|
142
|
+
light_state: dict | None = Field(None, alias="lightState")
|
129
143
|
low_power: bool | None = Field(None, alias="lowPower")
|
130
144
|
offline_time: int | None = Field(None, alias="offlineTime")
|
131
145
|
ota: int | None = None
|
132
146
|
overall: int | None = None
|
147
|
+
pack_state: int | None = Field(None, alias="packState")
|
148
|
+
package_install: int | None = Field(None, alias="packageInstall")
|
149
|
+
package_secret: str | None = Field(None, alias="packageSecret")
|
150
|
+
package_sn: str | None = Field(None, alias="packageSn")
|
151
|
+
package_state: int | None = Field(None, alias="packageState")
|
133
152
|
pet_error: bool | None = Field(None, alias="petError")
|
134
153
|
pet_in_time: int | None = Field(None, alias="petInTime")
|
135
154
|
pim: int | None = None
|
155
|
+
pi_ins: int | None = Field(None, alias="piIns")
|
136
156
|
power: int | None = None
|
157
|
+
purification_left_days: int | None = Field(None, alias="purificationLeftDays")
|
158
|
+
refresh_state: WorkState | None = Field(None, alias="refreshState")
|
137
159
|
sand_correct: int | None = Field(None, alias="sandCorrect")
|
138
160
|
sand_lack: bool | None = Field(None, alias="sandLack")
|
139
161
|
sand_percent: int | None = Field(None, alias="sandPercent")
|
140
162
|
sand_status: int | None = Field(None, alias="sandStatus")
|
141
163
|
sand_type: int | None = Field(None, alias="sandType")
|
142
164
|
sand_weight: int | None = Field(None, alias="sandWeight")
|
143
|
-
used_times: int | None = Field(None, alias="usedTimes")
|
144
|
-
wifi: Wifi | None = None
|
145
|
-
bagging_state: int | None = Field(None, alias="baggingState")
|
146
|
-
battery: int | None = None
|
147
|
-
box_store_state: int | None = Field(None, alias="boxStoreState")
|
148
|
-
camera_status: int | None = Field(None, alias="cameraStatus")
|
149
|
-
dump_state: int | None = Field(None, alias="dumpState")
|
150
|
-
liquid: int | None = None
|
151
|
-
light_state: dict | None = Field(None, alias="lightState")
|
152
|
-
pack_state: int | None = Field(None, alias="packState")
|
153
|
-
package_install: int | None = Field(None, alias="packageInstall")
|
154
|
-
package_secret: str | None = Field(None, alias="packageSecret")
|
155
|
-
package_sn: str | None = Field(None, alias="packageSn")
|
156
|
-
package_state: int | None = Field(None, alias="packageState")
|
157
|
-
pi_ins: int | None = Field(None, alias="piIns")
|
158
|
-
purification_left_days: int | None = Field(None, alias="purificationLeftDays")
|
159
165
|
seal_door_state: int | None = Field(None, alias="sealDoorState")
|
166
|
+
spray_days: int | None = Field(None, alias="sprayDays")
|
167
|
+
spray_left_days: int | None = Field(None, alias="sprayLeftDays")
|
168
|
+
spray_reset_time: int | None = Field(None, alias="sprayResetTime")
|
169
|
+
spray_state: int | None = Field(None, alias="sprayState")
|
160
170
|
top_ins: int | None = Field(None, alias="topIns")
|
171
|
+
used_times: int | None = Field(None, alias="usedTimes")
|
161
172
|
wander_time: int | None = Field(None, alias="wanderTime")
|
173
|
+
weight_state: int | None = Field(None, alias="weightState")
|
174
|
+
wifi: Wifi | None = None
|
162
175
|
work_state: WorkState | None = Field(None, alias="workState")
|
163
176
|
|
164
177
|
|
@@ -396,44 +409,46 @@ class Litter(BaseModel):
|
|
396
409
|
|
397
410
|
auto_upgrade: int | None = Field(None, alias="autoUpgrade")
|
398
411
|
bt_mac: str | None = Field(None, alias="btMac")
|
412
|
+
cloud_product: CloudProduct | None = Field(None, alias="cloudProduct") # For T5/T6
|
399
413
|
created_at: str | None = Field(None, alias="createdAt")
|
414
|
+
deodorant_tip: int | None = Field(None, alias="deodorantTip")
|
415
|
+
device_nfo: Device | None = None
|
416
|
+
device_pet_graph_out: list[PetOutGraph] | None = None
|
417
|
+
device_records: list[LitterRecord] | None = None
|
418
|
+
device_stats: LitterStats | None = None
|
400
419
|
firmware: float
|
401
420
|
firmware_details: list[FirmwareDetail] = Field(alias="firmwareDetails")
|
402
421
|
hardware: int
|
403
422
|
id: int
|
404
|
-
|
423
|
+
in_times: int | None = None
|
405
424
|
is_pet_out_tips: int | None = Field(None, alias="isPetOutTips")
|
425
|
+
k3_device: Purifier | None = Field(None, alias="k3Device")
|
426
|
+
last_out_time: int | None = None
|
406
427
|
locale: str | None = None
|
407
428
|
mac: str | None = None
|
408
429
|
maintenance_time: int | None = Field(None, alias="maintenanceTime")
|
430
|
+
medias: list | None = None
|
409
431
|
multi_config: bool | None = Field(None, alias="multiConfig")
|
410
432
|
name: str | None = None
|
433
|
+
p2p_type: int | None = Field(None, alias="p2pType")
|
434
|
+
package_ignore_state: int | None = Field(None, alias="packageIgnoreState")
|
435
|
+
package_total_count: int | None = Field(None, alias="packageTotalCount")
|
436
|
+
package_used_count: int | None = Field(None, alias="packageUsedCount")
|
411
437
|
pet_in_tip_limit: int | None = Field(None, alias="petInTipLimit")
|
438
|
+
pet_out_records: list[list[int]] | None = Field(None, alias="petOutRecords")
|
412
439
|
pet_out_tips: list[Any] | None = Field(None, alias="petOutTips")
|
440
|
+
purification_tip: int | None = Field(None, alias="purificationTip")
|
413
441
|
secret: str | None = None
|
442
|
+
service_status: int | None = None
|
414
443
|
settings: SettingsLitter | None = None
|
415
444
|
share_open: int | None = Field(None, alias="shareOpen")
|
416
445
|
signup_at: str | None = Field(None, alias="signupAt")
|
417
446
|
sn: str
|
418
447
|
state: StateLitter | None = None
|
419
448
|
timezone: float | None = None
|
420
|
-
|
421
|
-
in_times: int | None = Field(None, alias="inTimes")
|
422
|
-
last_out_time: int | None = Field(None, alias="lastOutTime")
|
423
|
-
p2p_type: int | None = Field(None, alias="p2pType")
|
424
|
-
package_ignore_state: int | None = Field(None, alias="packageIgnoreState")
|
425
|
-
package_total_count: int | None = Field(None, alias="packageTotalCount")
|
426
|
-
package_used_count: int | None = Field(None, alias="packageUsedCount")
|
427
|
-
pet_out_records: list[list[int]] | None = Field(None, alias="petOutRecords")
|
428
|
-
service_status: int | None = Field(None, alias="serviceStatus")
|
429
|
-
total_time: int | None = Field(None, alias="totalTime")
|
430
|
-
with_k3: int | None = Field(None, alias="withK3")
|
449
|
+
total_time: int | None = None
|
431
450
|
user: UserDevice | None = None
|
432
|
-
|
433
|
-
device_stats: LitterStats | None = None
|
434
|
-
device_pet_graph_out: list[PetOutGraph] | None = None
|
435
|
-
device_nfo: Device | None = None
|
436
|
-
medias: list | None = None
|
451
|
+
with_k3: int | None = Field(None, alias="withK3")
|
437
452
|
|
438
453
|
@classmethod
|
439
454
|
def get_endpoint(cls, device_type: str) -> str:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: pypetkitapi
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.16.0
|
4
4
|
Summary: Python client for PetKit API
|
5
5
|
License: MIT
|
6
6
|
Author: Jezza34000
|
@@ -52,6 +52,12 @@ Description-Content-Type: text/markdown
|
|
52
52
|
[pre-commit]: https://github.com/pre-commit/pre-commit
|
53
53
|
[black]: https://github.com/psf/black
|
54
54
|
|
55
|
+
### Enjoying this library?
|
56
|
+
|
57
|
+
[![Sponsor Jezza34000][github-sponsor-shield]][github-sponsor] [![Static Badge][buymeacoffee-shield]][buymeacoffee]
|
58
|
+
|
59
|
+
---
|
60
|
+
|
55
61
|
## Overview
|
56
62
|
|
57
63
|
PetKit Client is a Python library for interacting with the PetKit API. It allows you to manage your PetKit devices, retrieve account data, and control devices through the API.
|
@@ -62,6 +68,7 @@ PetKit Client is a Python library for interacting with the PetKit API. It allows
|
|
62
68
|
- Fetch account and device data
|
63
69
|
- Control PetKit devices (Feeder, Litter Box, Water Fountain, Purifiers)
|
64
70
|
- Fetch images & videos produced by devices
|
71
|
+
> Pictures are available **with or without** Care+ subscription, Videos are only available **with** Care+ subscription
|
65
72
|
|
66
73
|
## Installation
|
67
74
|
|
@@ -136,7 +143,9 @@ Check at the usage in the Home Assistant integration : [here](https://github.com
|
|
136
143
|
|
137
144
|
## Help and Support
|
138
145
|
|
139
|
-
|
146
|
+
Developers? Want to help? Join us on our Discord channel dedicated to developers and contributors.
|
147
|
+
|
148
|
+
[![Discord][discord-shield]][discord]
|
140
149
|
|
141
150
|
## Contributing
|
142
151
|
|
@@ -147,3 +156,21 @@ Please open an issue or submit a pull request.
|
|
147
156
|
|
148
157
|
This project is licensed under the MIT License. See the LICENSE file for details.
|
149
158
|
|
159
|
+
---
|
160
|
+
|
161
|
+
[homeassistant_petkit]: https://github.com/Jezza34000/py-petkit-api
|
162
|
+
[commits-shield]: https://img.shields.io/github/commit-activity/y/Jezza34000/py-petkit-api.svg?style=flat
|
163
|
+
[commits]: https://github.com/Jezza34000/py-petkit-api/commits/main
|
164
|
+
[discord]: https://discord.gg/Va8DrmtweP
|
165
|
+
[discord-shield]: https://img.shields.io/discord/1318098700379361362.svg?style=for-the-badge&label=Discord&logo=discord&color=5865F2
|
166
|
+
[forum-shield]: https://img.shields.io/badge/community-forum-brightgreen.svg?style=for-the-badge&label=Home%20Assistant%20Community&logo=homeassistant&color=18bcf2
|
167
|
+
[forum]: https://community.home-assistant.io/t/petkit-integration/834431
|
168
|
+
[license-shield]: https://img.shields.io/github/license/Jezza34000/py-petkit-api.svg??style=flat
|
169
|
+
[maintenance-shield]: https://img.shields.io/badge/maintainer-Jezza34000-blue.svg?style=flat
|
170
|
+
[releases-shield]: https://img.shields.io/github/release/Jezza34000/py-petkit-api.svg?style=for-the-badge&color=41BDF5
|
171
|
+
[releases]: https://github.com/Jezza34000/py-petkit-api/releases
|
172
|
+
[github-sponsor-shield]: https://img.shields.io/badge/sponsor-Jezza34000-blue.svg?style=for-the-badge&logo=githubsponsors&color=EA4AAA
|
173
|
+
[github-sponsor]: https://github.com/sponsors/Jezza34000
|
174
|
+
[buymeacoffee-shield]: https://img.shields.io/badge/Donate-buy_me_a_coffee-yellow.svg?style=for-the-badge&logo=buy-me-a-coffee
|
175
|
+
[buymeacoffee]: https://www.buymeacoffee.com/jezza
|
176
|
+
|
@@ -1,19 +1,19 @@
|
|
1
|
-
pypetkitapi/__init__.py,sha256=
|
1
|
+
pypetkitapi/__init__.py,sha256=mETLXBO3H-zRwGJYb2FNscHtzyxAEQwdTn1EBB1_DoE,2107
|
2
2
|
pypetkitapi/bluetooth.py,sha256=1zEZIrKNTttrZpqBiQ-6V37Uphft5_T8CH9OBfYjwxE,9915
|
3
|
-
pypetkitapi/client.py,sha256=
|
4
|
-
pypetkitapi/command.py,sha256=
|
5
|
-
pypetkitapi/const.py,sha256=
|
6
|
-
pypetkitapi/containers.py,sha256=
|
3
|
+
pypetkitapi/client.py,sha256=cn3JIh-3AU5Rzka2rX7FgkSfWeQCG9Vw82-moK_rOPY,30889
|
4
|
+
pypetkitapi/command.py,sha256=zw4h1SCInG2T0-wAA_al59_FTL36TUZldtJkYKw6ATI,7655
|
5
|
+
pypetkitapi/const.py,sha256=MMxkCCKrlRCh29kqJT8MSKz98hCwqS34qzxwBILAbvQ,4779
|
6
|
+
pypetkitapi/containers.py,sha256=7wYKmaoBpMKrqIVMsoD4Iv2in7Kh5nNxrl4vC4eF2fg,6305
|
7
7
|
pypetkitapi/exceptions.py,sha256=4BXUyYXLfZjNxdnOGJPjyE9ASIl7JmQphjws87jvHtE,1631
|
8
8
|
pypetkitapi/feeder_container.py,sha256=PhidWd5WpsZqtdKZy60PzE67YXgQfApjm8CqvMCHK3U,14743
|
9
|
-
pypetkitapi/litter_container.py,sha256=
|
9
|
+
pypetkitapi/litter_container.py,sha256=hu21mRTz6PlpuEoIJJKST1_kimQQ28MPLT7yIvHGJX0,19452
|
10
10
|
pypetkitapi/media.py,sha256=LNY3khU5eZN4i1MGHxJaPHcf3LA1fFaPVkn-wdn0YLI,27168
|
11
11
|
pypetkitapi/purifier_container.py,sha256=mAnvPF8Mm6YI43fitdxXEWScshM6sPg0KK6GXbylU1I,3179
|
12
12
|
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.
|
17
|
-
pypetkitapi-1.
|
18
|
-
pypetkitapi-1.
|
19
|
-
pypetkitapi-1.
|
16
|
+
pypetkitapi-1.16.0.dist-info/LICENSE,sha256=u5jNkZEn6YMrtN4Kr5rU3TcBJ5-eAt0qMx4JDsbsnzM,1074
|
17
|
+
pypetkitapi-1.16.0.dist-info/METADATA,sha256=JLiIEGKwu57JP_vyed-zZT1gkK7UygUyvCtpmfIWKYo,8633
|
18
|
+
pypetkitapi-1.16.0.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
19
|
+
pypetkitapi-1.16.0.dist-info/RECORD,,
|
File without changes
|