From 8479a785343f5ee4983966d6be5ad6b76be081e1 Mon Sep 17 00:00:00 2001 From: Shaun Tarves Date: Mon, 8 Jan 2024 11:50:35 -0500 Subject: [PATCH] fix: updated endpoint URLs for scale records --- wyze_sdk/service/scale_service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wyze_sdk/service/scale_service.py b/wyze_sdk/service/scale_service.py index ef8c27e..f30e9d8 100644 --- a/wyze_sdk/service/scale_service.py +++ b/wyze_sdk/service/scale_service.py @@ -183,7 +183,7 @@ def add_heart_rate_record(self, *, did: str, user_id: str, measure_ts: int, hear See: com.wyze.ihealth.d.b.p """ kwargs.update({'device_id': did, 'family_member_id': user_id, 'measure_ts': measure_ts, 'heart_rate': str(heart_rate)}) - return self.api_call('/plugin/scale/get_latest_record', json=kwargs) + return self.api_call('/plugin/scale/add_heart_rate_record', json=kwargs) def add_weight_record(self, *, did: str, mac: str, user_id: str, measure_ts: int, measure_type: int = 1, weight: float, **kwargs) -> WyzeResponse: """ @@ -192,7 +192,7 @@ def add_weight_record(self, *, did: str, mac: str, user_id: str, measure_ts: int See: com.wyze.ihealth.d.b.k """ kwargs.update({'device_id': did, 'mac': mac, 'family_member_id': user_id, 'measure_ts': measure_ts, 'measure_type': measure_type, 'weight': weight}) - return self.api_call('/plugin/scale/get_latest_record', json=kwargs) + return self.api_call('/plugin/scale/add_record', json=kwargs) def delete_record(self, *, data_id=Union[int, Sequence[int]], **kwargs) -> WyzeResponse: """