Added thermostat
This commit is contained in:
parent
4f57bbbaa0
commit
1d85cbe1ed
5
index.js
5
index.js
@ -399,7 +399,6 @@ SmartHomeNGAccessory.prototype = {
|
|||||||
getThermostatService: function(config) {
|
getThermostatService: function(config) {
|
||||||
var myService = new Service.Thermostat(config.name,config.name);
|
var myService = new Service.Thermostat(config.name,config.name);
|
||||||
|
|
||||||
|
|
||||||
// Current temperature
|
// Current temperature
|
||||||
if (config.currenttemperature) {
|
if (config.currenttemperature) {
|
||||||
this.log("["+ this.name +"] TemperatureSensor CurrentTemperature characteristic enabled");
|
this.log("["+ this.name +"] TemperatureSensor CurrentTemperature characteristic enabled");
|
||||||
@ -414,12 +413,12 @@ SmartHomeNGAccessory.prototype = {
|
|||||||
});
|
});
|
||||||
this.bindCharacteristic(myService, Characteristic.TargetTemperature, "Float", config.targettemperature, false);
|
this.bindCharacteristic(myService, Characteristic.TargetTemperature, "Float", config.targettemperature, false);
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
if (config.temperaturedisplayunits && config.temperaturedisplayunits.toLowerCase() == 'fahrenheit') {
|
if (config.temperaturedisplayunits && config.temperaturedisplayunits.toLowerCase() == 'fahrenheit') {
|
||||||
this.bindCharacteristic(myService, Characteristic.TemperatureDisplayUnits, "Int", Characteristic.TemperatureDisplayUnits.FAHRENHEIT, false);
|
this.bindCharacteristic(myService, Characteristic.TemperatureDisplayUnits, "Int", Characteristic.TemperatureDisplayUnits.FAHRENHEIT, false);
|
||||||
} else {
|
} else {
|
||||||
this.bindCharacteristic(myService, Characteristic.TemperatureDisplayUnits, "Int", Characteristic.TemperatureDisplayUnits.CELSIUS, false);
|
this.bindCharacteristic(myService, Characteristic.TemperatureDisplayUnits, "Int", Characteristic.TemperatureDisplayUnits.CELSIUS, false);
|
||||||
}
|
}*/
|
||||||
return myService;
|
return myService;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user