Skip to content

Commit

Permalink
Add default states for some thermostat values
Browse files Browse the repository at this point in the history
  • Loading branch information
balansse committed Jun 29, 2022
1 parent 38dc831 commit 6e40d98
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/accessories/thermostat.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ class Thermostat extends Device {
return this.Characteristic.CurrentHeatingCoolingState.HEAT
case VivintDict.OperatingStates.COOLING:
return this.Characteristic.CurrentHeatingCoolingState.COOL
default:
return this.Characteristic.CurrentHeatingCoolingState.OFF
}
}

Expand All @@ -109,6 +111,8 @@ class Thermostat extends Device {
return this.Characteristic.TargetHeatingCoolingState.AUTO
case VivintDict.OperatingModes.ECO:
return this.Characteristic.TargetHeatingCoolingState.AUTO // eco mode
default:
return this.Characteristic.TargetHeatingCoolingState.OFF
}
}

Expand Down Expand Up @@ -162,6 +166,8 @@ class Thermostat extends Device {
return this.getCoolSetPoint()
case this.Characteristic.TargetHeatingCoolingState.AUTO:
return this.getTemperatureValue()
default:
return this.getTemperatureValue()
}
}

Expand Down

0 comments on commit 6e40d98

Please sign in to comment.