mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 04:35:11 +02: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:
committed by
Fabian Affolter
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
|
||||
|
Reference in New Issue
Block a user