diff --git a/wyze_sdk/api/devices/bulbs.py b/wyze_sdk/api/devices/bulbs.py index 4f56dc5..aa0937c 100644 --- a/wyze_sdk/api/devices/bulbs.py +++ b/wyze_sdk/api/devices/bulbs.py @@ -1,4 +1,4 @@ -from datetime import datetime, timedelta +from datetime import timedelta from typing import Optional, Sequence, Union from wyze_sdk.errors import WyzeFeatureNotSupportedError diff --git a/wyze_sdk/models/devices/bulbs.py b/wyze_sdk/models/devices/bulbs.py index b1a13a7..b9124a2 100644 --- a/wyze_sdk/models/devices/bulbs.py +++ b/wyze_sdk/models/devices/bulbs.py @@ -1,5 +1,6 @@ from typing import (Optional, Set, Union) +from wyze_sdk.errors import WyzeFeatureNotSupportedError from wyze_sdk.models import (PropDef, show_unknown_key_warning) from wyze_sdk.models.devices import (AbstractWirelessNetworkedDevice, DeviceProp, DeviceProps, SwitchableMixin) @@ -124,6 +125,10 @@ def power_loss_recovery(self, value: Union[int, DeviceProp]): value = DeviceProp(definition=BulbProps.power_loss_recovery, value=value) self._power_loss_recovery = value + @property + def color(self) -> str: + raise WyzeFeatureNotSupportedError("color") + @classmethod def parse(cls, device: Union[dict, "Bulb"]) -> Optional["Bulb"]: if device is None: @@ -165,7 +170,7 @@ def __init__( @property def color(self) -> str: - return "" if self._color is None else self._color.value + return None if self._color is None else self._color.value @color.setter def color(self, value: Union[str, DeviceProp]):