Added thermostat

This commit is contained in:
Foxi352 2016-09-09 15:45:23 +02:00
parent 4f57bbbaa0
commit 1d85cbe1ed

View File

@ -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;
}, },