Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix auto update switch #786

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion kasa/smart/modules/firmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def __init__(self, device: "SmartDevice", module: str):
"Auto update enabled",
container=self,
attribute_getter="auto_update_enabled",
attribute_setter="set_auto_update_enabled",
type=FeatureType.Switch,
)
)
Expand Down Expand Up @@ -101,4 +102,5 @@ def auto_update_enabled(self):

async def set_auto_update_enabled(self, enabled: bool):
"""Change autoupdate setting."""
await self.call("set_auto_update_info", {"enable": enabled})
data = {**self.data["get_auto_update_info"], "enable": enabled}
await self.call("set_auto_update_info", data) #{"enable": enabled})