diff --git a/wyze_sdk/models/devices/thermostats.py b/wyze_sdk/models/devices/thermostats.py index 3ec28bb..1ccd952 100644 --- a/wyze_sdk/models/devices/thermostats.py +++ b/wyze_sdk/models/devices/thermostats.py @@ -219,6 +219,8 @@ def fan_mode(self) -> ThermostatFanMode: @fan_mode.setter def fan_mode(self, value: Union[str, DeviceProp]): + if value is None: + return if isinstance(value, str): value = DeviceProp(definition=ThermostatProps.fan_mode, value=value) self._fan_mode = ThermostatFanMode.parse(value.value) @@ -229,6 +231,8 @@ def system_mode(self) -> ThermostatSystemMode: @system_mode.setter def system_mode(self, value: Union[str, DeviceProp]): + if value is None: + return if isinstance(value, str): value = DeviceProp(definition=ThermostatProps.system_mode, value=value) self._system_mode = ThermostatSystemMode.parse(value.value) @@ -239,6 +243,8 @@ def current_scenario(self) -> ThermostatScenarioType: @current_scenario.setter def current_scenario(self, value: Union[str, DeviceProp]): + if value is None: + return if isinstance(value, str): value = DeviceProp(definition=ThermostatProps.current_scenario, value=value) self._current_scenario = ThermostatScenarioType.parse(value.value)