mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-27 18:51:55 +00:00
Add _check_supported
This commit is contained in:
@@ -96,3 +96,10 @@ class PowerProtection(SmartModule):
|
||||
"protection_power": threshold,
|
||||
}
|
||||
return await self.call("set_protection_power", params)
|
||||
|
||||
async def _check_supported(self) -> bool:
|
||||
"""Return True if module is supported.
|
||||
|
||||
This is needed, as strips like P304M report the status only for children.
|
||||
"""
|
||||
return "power_protection_status" in self._device.sys_info
|
||||
|
||||
Reference in New Issue
Block a user