From 086884a69254829314f953cf109bdf70d0fa348d Mon Sep 17 00:00:00 2001 From: Daniel Hobley Date: Sat, 21 Feb 2026 21:06:02 +0100 Subject: [PATCH] fix: curfew JSON does not accept an array of dicts but just a dict This PR fixes the set_curfew API call which accepts a singular dictionary rather than an array of dictionaries. --- surepy/client.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/surepy/client.py b/surepy/client.py index e4006cd..2a62b9b 100644 --- a/surepy/client.py +++ b/surepy/client.py @@ -398,13 +398,12 @@ async def set_curfew( resource = CONTROL_RESOURCE.format(BASE_RESOURCE=BASE_RESOURCE, device_id=device_id) data = { - "curfew": [ + "curfew": { "lock_time": lock_time.strftime("%H:%M"), "unlock_time": unlock_time.strftime("%H:%M"), "enabled": True, } - ] } if (