diff --git a/kasa/iot/iotbulb.py b/kasa/iot/iotbulb.py index 7e00bebc..3302e80d 100644 --- a/kasa/iot/iotbulb.py +++ b/kasa/iot/iotbulb.py @@ -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( diff --git a/kasa/smart/modules/color.py b/kasa/smart/modules/color.py index 772d9335..3faa1a82 100644 --- a/kasa/smart/modules/color.py +++ b/kasa/smart/modules/color.py @@ -44,7 +44,9 @@ class Color(SmartModule): self.data.get("brightness", 0), ) - return HSV(hue=h, saturation=s, value=v) + # Simple HSV(h, s, v) is less efficent than below + # due to the cpython implementation. + return tuple.__new__(HSV, (h, s, v)) def _raise_for_invalid_brightness(self, value): """Raise error on invalid brightness value."""