From c89327223db082184b72f495f432816cb8161b5f Mon Sep 17 00:00:00 2001 From: David Knowles Date: Mon, 25 Nov 2024 14:10:04 +0000 Subject: [PATCH] Clarify a comment --- pyschlage/code.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pyschlage/code.py b/pyschlage/code.py index c92ec30..6d54159 100644 --- a/pyschlage/code.py +++ b/pyschlage/code.py @@ -248,10 +248,8 @@ def save(self): command = "updateaccesscode" if self.access_code_id else "addaccesscode" resp = self._device.send_command(command, self.to_json()) - # Either `{ "accesscodeId": "XXX" }` appears to be returned on `addaccesscode`; - # otherwise {} is returned when updated. - # Thus, calling `self._update_with()` does now work here as it calls - # `from_json()` which currently requires the presence other parameters. + # NOTE: We don't call self._update_with() here because the API only returns + # the accesscodeId field. resp_json = resp.json() if "accesscodeId" in resp_json: self.access_code_id = resp_json["accesscodeId"]