mirror of
https://github.com/python-kasa/python-kasa.git
synced 2026-07-11 01:42:05 +00:00
Fix SMARTCAM Time module and update tests (#1659)
Update SmartCam time handling to apply timezone-only changes with explicit warnings, while keeping common time and CLI tests focused on devices that support setting clock time and adding SmartCam-specific coverage for the special behavior.
This commit is contained in:
@@ -337,11 +337,11 @@ class FakeSmartCamTransport(BaseTransport):
|
||||
if setter_keys := self.SETTERS.get((module, section, section_key)):
|
||||
self._get_param_set_value(info, setter_keys, section_value)
|
||||
elif (
|
||||
section := info.get(get_method, {})
|
||||
section_data := info.get(get_method, {})
|
||||
.get(module, {})
|
||||
.get(section, {})
|
||||
) and section_key in section:
|
||||
section[section_key] = section_value
|
||||
) and section_key in section_data:
|
||||
section_data[section_key] = section_value
|
||||
else:
|
||||
return {"error_code": -1}
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user