Skip to content

Commit

Permalink
🐛 fix pet weight endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Jezza34000 committed Feb 23, 2025
1 parent 66e94ee commit d2fdddc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pypetkitapi/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
FEEDER_MINI,
K2,
K3,
PET,
T3,
T4,
T5,
Expand Down Expand Up @@ -265,11 +266,11 @@ def get_endpoint_update_setting(device):
supported_device=[D3],
),
PetCommand.PET_UPDATE_SETTING: CmdData(
endpoint=PetkitEndpoint.CONTROL_DEVICE,
endpoint=PetkitEndpoint.PET_UPDATE_SETTING,
params=lambda pet, setting: {
"petId": pet,
"petId": pet.pet_id,
"kv": json.dumps(setting),
},
supported_device=ALL_DEVICES,
supported_device=[PET],
),
}
3 changes: 3 additions & 0 deletions pypetkitapi/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,6 @@ class PetkitEndpoint(StrEnum):
SCHEDULE_REMOVE = "schedule/remove"
SCHEDULE_COMPLETE = "schedule/complete"
SCHEDULE_HISTORY = "schedule/userHistorySchedules"

# Pet
PET_UPDATE_SETTING = "updatepetprops"

0 comments on commit d2fdddc

Please sign in to comment.