1
0
mirror of https://github.com/USA-RedDragon/badnest.git synced 2025-01-18 18:20:44 +00:00

Fix the attempt to get mode before mode is set

This commit is contained in:
Jacob McSwain 2019-10-19 17:42:17 -05:00
parent 5d74119c38
commit aeecf31aea
No known key found for this signature in database
GPG Key ID: 59957AD09B94EDF5

View File

@ -168,7 +168,7 @@ class NestClimate(ClimateDevice):
@property
def hvac_mode(self):
"""Return hvac target hvac state."""
if self.device.mode == NEST_MODE_ECO:
if self.device.mode is None or self.device.mode == NEST_MODE_ECO:
# We assume the first operation in operation list is the main one
return self._operation_list[0]