mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-06 10:44:04 +00:00
Make HSV NamedTuple creation more efficient (#1211)
This commit is contained in:
@@ -367,7 +367,9 @@ class IotBulb(IotDevice):
|
||||
saturation = light_state["saturation"]
|
||||
value = self._brightness
|
||||
|
||||
return HSV(hue, saturation, value)
|
||||
# Simple HSV(hue, saturation, value) is less efficent than below
|
||||
# due to the cpython implementation.
|
||||
return tuple.__new__(HSV, (hue, saturation, value))
|
||||
|
||||
@requires_update
|
||||
async def _set_hsv(
|
||||
|
Reference in New Issue
Block a user