| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| """Implementation of lens mask privacy module.""" | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| import logging | ||
|
|
||
| from ..smartcammodule import SmartCamModule | ||
|
|
||
| _LOGGER = logging.getLogger(__name__) | ||
|
|
||
|
|
||
| class LensMask(SmartCamModule): | ||
| """Implementation of lens mask module.""" | ||
|
|
||
| QUERY_GETTER_NAME = "getLensMaskConfig" | ||
| QUERY_MODULE_NAME = "lens_mask" | ||
| QUERY_SECTION_NAMES = "lens_mask_info" | ||
|
|
||
| @property | ||
| def state(self) -> bool: | ||
| """Return the lens mask state.""" | ||
| return self.data["lens_mask_info"]["enabled"] == "off" | ||
|
|
||
| async def set_state(self, state: bool) -> dict: | ||
| """Set the lens mask state.""" | ||
| params = {"enabled": "on" if state else "off"} | ||
| return await self._device._query_setter_helper( | ||
| "setLensMaskConfig", self.QUERY_MODULE_NAME, "lens_mask_info", params | ||
| ) |
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.