mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-11 18:08:02 +00:00
Allow update of camera modules after setting values (#1450)
This commit is contained in:
@@ -5,6 +5,7 @@ from __future__ import annotations
|
||||
import logging
|
||||
|
||||
from ...feature import Feature
|
||||
from ...smart.smartmodule import allow_update_after
|
||||
from ..smartcammodule import SmartCamModule
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
@@ -39,6 +40,7 @@ class PersonDetection(SmartCamModule):
|
||||
"""Return the person detection enabled state."""
|
||||
return self.data["detection"]["enabled"] == "on"
|
||||
|
||||
@allow_update_after
|
||||
async def set_enabled(self, enable: bool) -> dict:
|
||||
"""Set the person detection enabled state."""
|
||||
params = {"enabled": "on" if enable else "off"}
|
||||
|
Reference in New Issue
Block a user