mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-09 20:24:02 +00:00
Improve smartprotocol error handling and retries (#578)
* Improve smartprotocol error handling and retries * Update after review * Enum to IntEnum and SLEEP_SECONDS_AFTER_TIMEOUT
This commit is contained in:
@@ -166,13 +166,7 @@ class TapoBulb(TapoDevice, SmartBulb):
|
||||
if value is not None:
|
||||
request_payload["brightness"] = value
|
||||
|
||||
return await self.protocol.query(
|
||||
{
|
||||
"set_device_info": {
|
||||
**request_payload
|
||||
}
|
||||
}
|
||||
)
|
||||
return await self.protocol.query({"set_device_info": {**request_payload}})
|
||||
|
||||
async def set_color_temp(
|
||||
self, temp: int, *, brightness=None, transition: Optional[int] = None
|
||||
|
Reference in New Issue
Block a user