Throw an error when invalid device_mode is given (#13739)
* Throw an error when invalid device_mode is given * Fix lint issue, typo and error msg * Fix error msg
This commit is contained in:
1 parent
435b49fb96
commit
6cd599b7df
1 file changed
+5
@@ -187,6 +187,11 @@ class NestThermostat(ClimateDevice):
|
||||
device_mode = operation_mode
|
||||
elif operation_mode == STATE_AUTO:
|
||||
device_mode = NEST_MODE_HEAT_COOL
|
||||
else:
|
||||
device_mode = STATE_OFF
|
||||
_LOGGER.error(
|
||||
"An error occurred while setting device mode. "
|
||||
"Invalid operation mode: %s", operation_mode)
|
||||
self.device.mode = device_mode
|
||||
|
||||
@property
|
||||
|
||||
Reference in new issue
Block a user