pypetkitapi 1.15.0__tar.gz → 1.16.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.
- {pypetkitapi-1.15.0 → pypetkitapi-1.16.1}/PKG-INFO +29 -2
- {pypetkitapi-1.15.0 → pypetkitapi-1.16.1}/README.md +28 -1
- {pypetkitapi-1.15.0 → pypetkitapi-1.16.1}/pypetkitapi/__init__.py +1 -1
- {pypetkitapi-1.15.0 → pypetkitapi-1.16.1}/pypetkitapi/command.py +6 -4
- {pypetkitapi-1.15.0 → pypetkitapi-1.16.1}/pypetkitapi/const.py +1 -1
- {pypetkitapi-1.15.0 → pypetkitapi-1.16.1}/pypetkitapi/litter_container.py +104 -62
- {pypetkitapi-1.15.0 → pypetkitapi-1.16.1}/pyproject.toml +2 -2
- {pypetkitapi-1.15.0 → pypetkitapi-1.16.1}/LICENSE +0 -0
- {pypetkitapi-1.15.0 → pypetkitapi-1.16.1}/pypetkitapi/bluetooth.py +0 -0
- {pypetkitapi-1.15.0 → pypetkitapi-1.16.1}/pypetkitapi/client.py +0 -0
- {pypetkitapi-1.15.0 → pypetkitapi-1.16.1}/pypetkitapi/containers.py +0 -0
- {pypetkitapi-1.15.0 → pypetkitapi-1.16.1}/pypetkitapi/exceptions.py +0 -0
- {pypetkitapi-1.15.0 → pypetkitapi-1.16.1}/pypetkitapi/feeder_container.py +0 -0
- {pypetkitapi-1.15.0 → pypetkitapi-1.16.1}/pypetkitapi/media.py +0 -0
- {pypetkitapi-1.15.0 → pypetkitapi-1.16.1}/pypetkitapi/purifier_container.py +0 -0
- {pypetkitapi-1.15.0 → pypetkitapi-1.16.1}/pypetkitapi/py.typed +0 -0
- {pypetkitapi-1.15.0 → pypetkitapi-1.16.1}/pypetkitapi/schedule_container.py +0 -0
- {pypetkitapi-1.15.0 → pypetkitapi-1.16.1}/pypetkitapi/utils.py +0 -0
- {pypetkitapi-1.15.0 → pypetkitapi-1.16.1}/pypetkitapi/water_fountain_container.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: pypetkitapi
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.16.1
|
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
|
+
|
@@ -31,6 +31,12 @@
|
|
31
31
|
[pre-commit]: https://github.com/pre-commit/pre-commit
|
32
32
|
[black]: https://github.com/psf/black
|
33
33
|
|
34
|
+
### Enjoying this library?
|
35
|
+
|
36
|
+
[![Sponsor Jezza34000][github-sponsor-shield]][github-sponsor] [![Static Badge][buymeacoffee-shield]][buymeacoffee]
|
37
|
+
|
38
|
+
---
|
39
|
+
|
34
40
|
## Overview
|
35
41
|
|
36
42
|
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.
|
@@ -41,6 +47,7 @@ PetKit Client is a Python library for interacting with the PetKit API. It allows
|
|
41
47
|
- Fetch account and device data
|
42
48
|
- Control PetKit devices (Feeder, Litter Box, Water Fountain, Purifiers)
|
43
49
|
- Fetch images & videos produced by devices
|
50
|
+
> Pictures are available **with or without** Care+ subscription, Videos are only available **with** Care+ subscription
|
44
51
|
|
45
52
|
## Installation
|
46
53
|
|
@@ -115,7 +122,9 @@ Check at the usage in the Home Assistant integration : [here](https://github.com
|
|
115
122
|
|
116
123
|
## Help and Support
|
117
124
|
|
118
|
-
|
125
|
+
Developers? Want to help? Join us on our Discord channel dedicated to developers and contributors.
|
126
|
+
|
127
|
+
[![Discord][discord-shield]][discord]
|
119
128
|
|
120
129
|
## Contributing
|
121
130
|
|
@@ -125,3 +134,21 @@ Please open an issue or submit a pull request.
|
|
125
134
|
## License
|
126
135
|
|
127
136
|
This project is licensed under the MIT License. See the LICENSE file for details.
|
137
|
+
|
138
|
+
---
|
139
|
+
|
140
|
+
[homeassistant_petkit]: https://github.com/Jezza34000/py-petkit-api
|
141
|
+
[commits-shield]: https://img.shields.io/github/commit-activity/y/Jezza34000/py-petkit-api.svg?style=flat
|
142
|
+
[commits]: https://github.com/Jezza34000/py-petkit-api/commits/main
|
143
|
+
[discord]: https://discord.gg/Va8DrmtweP
|
144
|
+
[discord-shield]: https://img.shields.io/discord/1318098700379361362.svg?style=for-the-badge&label=Discord&logo=discord&color=5865F2
|
145
|
+
[forum-shield]: https://img.shields.io/badge/community-forum-brightgreen.svg?style=for-the-badge&label=Home%20Assistant%20Community&logo=homeassistant&color=18bcf2
|
146
|
+
[forum]: https://community.home-assistant.io/t/petkit-integration/834431
|
147
|
+
[license-shield]: https://img.shields.io/github/license/Jezza34000/py-petkit-api.svg??style=flat
|
148
|
+
[maintenance-shield]: https://img.shields.io/badge/maintainer-Jezza34000-blue.svg?style=flat
|
149
|
+
[releases-shield]: https://img.shields.io/github/release/Jezza34000/py-petkit-api.svg?style=for-the-badge&color=41BDF5
|
150
|
+
[releases]: https://github.com/Jezza34000/py-petkit-api/releases
|
151
|
+
[github-sponsor-shield]: https://img.shields.io/badge/sponsor-Jezza34000-blue.svg?style=for-the-badge&logo=githubsponsors&color=EA4AAA
|
152
|
+
[github-sponsor]: https://github.com/sponsors/Jezza34000
|
153
|
+
[buymeacoffee-shield]: https://img.shields.io/badge/Donate-buy_me_a_coffee-yellow.svg?style=for-the-badge&logo=buy-me-a-coffee
|
154
|
+
[buymeacoffee]: https://www.buymeacoffee.com/jezza
|
@@ -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,
|
@@ -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"
|
@@ -25,17 +25,26 @@ from pypetkitapi.purifier_container import Purifier
|
|
25
25
|
|
26
26
|
|
27
27
|
class SettingsLitter(BaseModel):
|
28
|
-
"""
|
29
|
-
->
|
28
|
+
"""Sub-dataclass for settings of Litter.
|
29
|
+
Litter -> settings
|
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,13 +96,19 @@ 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):
|
102
|
-
"""
|
109
|
+
"""Sub-Sub-dataclass for state of Litter.
|
110
|
+
Litter -> state -> [STATE] -> WorkState
|
111
|
+
"""
|
103
112
|
|
104
113
|
safe_warn: int | None = Field(None, alias="safeWarn")
|
105
114
|
stop_time: int | None = Field(None, alias="stopTime")
|
@@ -110,60 +119,68 @@ class WorkState(BaseModel):
|
|
110
119
|
|
111
120
|
|
112
121
|
class StateLitter(BaseModel):
|
113
|
-
"""
|
114
|
-
->
|
122
|
+
"""Sub-dataclass for state of Litter.
|
123
|
+
Litter -> state
|
115
124
|
"""
|
116
125
|
|
126
|
+
bagging_state: int | None = Field(None, alias="baggingState")
|
127
|
+
battery: int | None = None
|
117
128
|
box: int | None = None
|
118
129
|
box_full: bool | None = Field(None, alias="boxFull")
|
119
130
|
box_state: int | None = Field(None, alias="boxState")
|
131
|
+
box_store_state: int | None = Field(None, alias="boxStoreState")
|
132
|
+
camera_status: int | None = Field(None, alias="cameraStatus")
|
120
133
|
deodorant_left_days: int | None = Field(None, alias="deodorantLeftDays")
|
134
|
+
dump_state: int | None = Field(None, alias="dumpState")
|
121
135
|
error_code: str | None = Field(None, alias="errorCode")
|
122
136
|
error_detail: str | None = Field(None, alias="errorDetail")
|
123
137
|
error_level: int | None = Field(None, alias="errorLevel")
|
124
138
|
error_msg: str | None = Field(None, alias="errorMsg")
|
125
139
|
frequent_restroom: int | None = Field(None, alias="frequentRestroom")
|
140
|
+
liquid: int | None = None
|
126
141
|
liquid_empty: bool | None = Field(None, alias="liquidEmpty")
|
127
142
|
liquid_lack: bool | None = Field(None, alias="liquidLack")
|
128
143
|
liquid_reset: int | None = Field(None, alias="liquidReset")
|
144
|
+
light_state: WorkState | None = Field(None, alias="lightState")
|
129
145
|
low_power: bool | None = Field(None, alias="lowPower")
|
130
146
|
offline_time: int | None = Field(None, alias="offlineTime")
|
131
147
|
ota: int | None = None
|
132
148
|
overall: int | None = None
|
149
|
+
pack_state: int | None = Field(None, alias="packState")
|
150
|
+
package_install: int | None = Field(None, alias="packageInstall")
|
151
|
+
package_secret: str | None = Field(None, alias="packageSecret")
|
152
|
+
package_sn: str | None = Field(None, alias="packageSn")
|
153
|
+
package_state: int | None = Field(None, alias="packageState")
|
133
154
|
pet_error: bool | None = Field(None, alias="petError")
|
134
155
|
pet_in_time: int | None = Field(None, alias="petInTime")
|
135
156
|
pim: int | None = None
|
157
|
+
pi_ins: int | None = Field(None, alias="piIns")
|
136
158
|
power: int | None = None
|
159
|
+
purification_left_days: int | None = Field(None, alias="purificationLeftDays")
|
160
|
+
refresh_state: WorkState | None = Field(None, alias="refreshState")
|
137
161
|
sand_correct: int | None = Field(None, alias="sandCorrect")
|
138
162
|
sand_lack: bool | None = Field(None, alias="sandLack")
|
139
163
|
sand_percent: int | None = Field(None, alias="sandPercent")
|
140
164
|
sand_status: int | None = Field(None, alias="sandStatus")
|
141
165
|
sand_type: int | None = Field(None, alias="sandType")
|
142
166
|
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
167
|
seal_door_state: int | None = Field(None, alias="sealDoorState")
|
168
|
+
spray_days: int | None = Field(None, alias="sprayDays")
|
169
|
+
spray_left_days: int | None = Field(None, alias="sprayLeftDays")
|
170
|
+
spray_reset_time: int | None = Field(None, alias="sprayResetTime")
|
171
|
+
spray_state: int | None = Field(None, alias="sprayState")
|
160
172
|
top_ins: int | None = Field(None, alias="topIns")
|
173
|
+
used_times: int | None = Field(None, alias="usedTimes")
|
161
174
|
wander_time: int | None = Field(None, alias="wanderTime")
|
175
|
+
weight_state: int | None = Field(None, alias="weightState")
|
176
|
+
wifi: Wifi | None = None
|
162
177
|
work_state: WorkState | None = Field(None, alias="workState")
|
163
178
|
|
164
179
|
|
165
180
|
class ContentSC(BaseModel):
|
166
|
-
"""
|
181
|
+
"""Sub-Sub-class of LitterRecord.
|
182
|
+
LitterRecord -> subContent -> content
|
183
|
+
"""
|
167
184
|
|
168
185
|
box: int | None = None
|
169
186
|
box_full: bool | None = Field(None, alias="boxFull")
|
@@ -178,18 +195,30 @@ class ContentSC(BaseModel):
|
|
178
195
|
|
179
196
|
|
180
197
|
class LRContent(BaseModel):
|
181
|
-
"""Dataclass for
|
198
|
+
"""Dataclass for sub-content of LitterRecord.
|
199
|
+
LitterRecord -> ShitPictures
|
200
|
+
"""
|
182
201
|
|
202
|
+
area: int | None = None
|
183
203
|
auto_clear: int | None = Field(None, alias="autoClear")
|
204
|
+
clear_over_tips: int | None = Field(None, alias="clearOverTips")
|
205
|
+
count: int | None = None
|
184
206
|
interval: int | None = None
|
207
|
+
mark: int | None = None
|
208
|
+
media: int | None = None
|
209
|
+
pet_out_tips: int | None = Field(None, alias="petOutTips")
|
185
210
|
pet_weight: int | None = Field(None, alias="petWeight")
|
211
|
+
start_time: int | None = Field(None, alias="startTime")
|
186
212
|
time_in: int | None = Field(None, alias="timeIn")
|
187
213
|
time_out: int | None = Field(None, alias="timeOut")
|
188
|
-
|
214
|
+
toilet_detection: int | None = Field(None, alias="toiletDetection")
|
215
|
+
upload: int | None = None
|
189
216
|
|
190
217
|
|
191
218
|
class LRSubContent(BaseModel):
|
192
|
-
"""
|
219
|
+
"""Subclass of LitterRecord.
|
220
|
+
LitterRecord -> subContent
|
221
|
+
"""
|
193
222
|
|
194
223
|
aes_key: str | None = Field(None, alias="aesKey")
|
195
224
|
content: ContentSC | None = None
|
@@ -213,9 +242,19 @@ class LRSubContent(BaseModel):
|
|
213
242
|
user_id: str | None = Field(None, alias="userId")
|
214
243
|
|
215
244
|
|
245
|
+
class ShitPictures(BaseModel):
|
246
|
+
"""Dataclass for sub-content of LitterRecord.
|
247
|
+
LitterRecord -> ShitPictures
|
248
|
+
"""
|
249
|
+
|
250
|
+
pic_id: str | None = Field(None, alias="picId")
|
251
|
+
shit_aes_key: str | None = Field(None, alias="shitAesKey")
|
252
|
+
shit_picture: str | None = Field(None, alias="shitPicture")
|
253
|
+
|
254
|
+
|
216
255
|
class LitterRecord(BaseModel):
|
217
256
|
"""Dataclass for feeder record data.
|
218
|
-
Litter records
|
257
|
+
Litter records (Main class)
|
219
258
|
"""
|
220
259
|
|
221
260
|
data_type: ClassVar[str] = DEVICE_RECORDS
|
@@ -237,6 +276,7 @@ class LitterRecord(BaseModel):
|
|
237
276
|
pet_name: str | None = Field(None, alias="petName")
|
238
277
|
preview: str | None = None
|
239
278
|
related_event: str | None = Field(None, alias="relatedEvent")
|
279
|
+
shit_pictures: ShitPictures | None = None
|
240
280
|
storage_space: int | None = Field(None, alias="storageSpace")
|
241
281
|
sub_content: list[LRSubContent] | None = Field(None, alias="subContent")
|
242
282
|
timestamp: int | None = None
|
@@ -396,44 +436,46 @@ class Litter(BaseModel):
|
|
396
436
|
|
397
437
|
auto_upgrade: int | None = Field(None, alias="autoUpgrade")
|
398
438
|
bt_mac: str | None = Field(None, alias="btMac")
|
439
|
+
cloud_product: CloudProduct | None = Field(None, alias="cloudProduct") # For T5/T6
|
399
440
|
created_at: str | None = Field(None, alias="createdAt")
|
441
|
+
deodorant_tip: int | None = Field(None, alias="deodorantTip")
|
442
|
+
device_nfo: Device | None = None
|
443
|
+
device_pet_graph_out: list[PetOutGraph] | None = None
|
444
|
+
device_records: list[LitterRecord] | None = None
|
445
|
+
device_stats: LitterStats | None = None
|
400
446
|
firmware: float
|
401
447
|
firmware_details: list[FirmwareDetail] = Field(alias="firmwareDetails")
|
402
448
|
hardware: int
|
403
449
|
id: int
|
404
|
-
|
450
|
+
in_times: int | None = None
|
405
451
|
is_pet_out_tips: int | None = Field(None, alias="isPetOutTips")
|
452
|
+
k3_device: Purifier | None = Field(None, alias="k3Device")
|
453
|
+
last_out_time: int | None = None
|
406
454
|
locale: str | None = None
|
407
455
|
mac: str | None = None
|
408
456
|
maintenance_time: int | None = Field(None, alias="maintenanceTime")
|
457
|
+
medias: list | None = None
|
409
458
|
multi_config: bool | None = Field(None, alias="multiConfig")
|
410
459
|
name: str | None = None
|
460
|
+
p2p_type: int | None = Field(None, alias="p2pType")
|
461
|
+
package_ignore_state: int | None = Field(None, alias="packageIgnoreState")
|
462
|
+
package_total_count: int | None = Field(None, alias="packageTotalCount")
|
463
|
+
package_used_count: int | None = Field(None, alias="packageUsedCount")
|
411
464
|
pet_in_tip_limit: int | None = Field(None, alias="petInTipLimit")
|
465
|
+
pet_out_records: list[list[int]] | None = Field(None, alias="petOutRecords")
|
412
466
|
pet_out_tips: list[Any] | None = Field(None, alias="petOutTips")
|
467
|
+
purification_tip: int | None = Field(None, alias="purificationTip")
|
413
468
|
secret: str | None = None
|
469
|
+
service_status: int | None = None
|
414
470
|
settings: SettingsLitter | None = None
|
415
471
|
share_open: int | None = Field(None, alias="shareOpen")
|
416
472
|
signup_at: str | None = Field(None, alias="signupAt")
|
417
473
|
sn: str
|
418
474
|
state: StateLitter | None = None
|
419
475
|
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")
|
476
|
+
total_time: int | None = None
|
431
477
|
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
|
478
|
+
with_k3: int | None = Field(None, alias="withK3")
|
437
479
|
|
438
480
|
@classmethod
|
439
481
|
def get_endpoint(cls, device_type: str) -> str:
|
@@ -186,7 +186,7 @@ build-backend = "poetry.core.masonry.api"
|
|
186
186
|
|
187
187
|
[tool.poetry]
|
188
188
|
name = "pypetkitapi"
|
189
|
-
version = "1.
|
189
|
+
version = "1.16.1"
|
190
190
|
description = "Python client for PetKit API"
|
191
191
|
authors = ["Jezza34000 <info@mail.com>"]
|
192
192
|
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.
|
211
|
+
current_version = "1.16.1"
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|