mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +00:00
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:
parent
435b49fb96
commit
6cd599b7df
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user