homebridge-panasonic-heat-pump
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -34,2 +34,5 @@ import { PlatformAccessory } from 'homebridge'; | ||
tankTemperatureMin: any; | ||
targetTempSet: any; | ||
targetTempMin: any; | ||
targetTempMax: any; | ||
}>; | ||
@@ -36,0 +39,0 @@ updateReadings(): Promise<void>; |
@@ -21,5 +21,5 @@ "use strict"; | ||
// FLOOR | ||
this.service = this.accessory.getService('Floors') | ||
|| this.accessory.addService(this.platform.Service.Thermostat, 'Floors', 'floors'); | ||
this.service.setCharacteristic(this.platform.Characteristic.Name, 'Floors'); | ||
this.service = this.accessory.getService('Floor Heating') | ||
|| this.accessory.addService(this.platform.Service.Thermostat, 'Floor Heating', 'floorheating'); | ||
this.service.setCharacteristic(this.platform.Characteristic.Name, 'Floor Heating'); | ||
this.service.getCharacteristic(this.platform.Characteristic.CurrentTemperature).setProps({ | ||
@@ -190,2 +190,37 @@ minValue: 0, | ||
})(); | ||
const { targetTempSet, targetTempMin, targetTempMax } = (() => { | ||
if (ecoModeIsActive) { | ||
return { | ||
targetTempSet: operationalZone.ecoSet, | ||
targetTempMin: operationalZone.ecoMin, | ||
targetTempMax: operationalZone.ecoMax, | ||
}; | ||
} | ||
if (comfortModeIsActive) { | ||
return { | ||
targetTempSet: operationalZone.comfortSet, | ||
targetTempMin: operationalZone.comfortMin, | ||
targetTempMax: operationalZone.comfortMax, | ||
}; | ||
} | ||
if (operationMode === 1 || operationMode === 3) { | ||
return { | ||
targetTempSet: operationalZone.heatSet, | ||
targetTempMin: operationalZone.heatMin, | ||
targetTempMax: operationalZone.heatMax, | ||
}; | ||
} | ||
if (operationMode === 2 || operationMode === 4) { | ||
return { | ||
targetTempSet: operationalZone.coolSet, | ||
targetTempMin: operationalZone.coolMin, | ||
targetTempMax: operationalZone.coolMax, | ||
}; | ||
} | ||
return { | ||
targetTempSet: 0, | ||
targetTempMin: 0, | ||
targetTempMax: 0, | ||
}; | ||
})(); | ||
return { | ||
@@ -205,2 +240,5 @@ temperatureNow, | ||
tankTemperatureMin: details.tankStatus[0].heatMin, | ||
targetTempSet, | ||
targetTempMin, | ||
targetTempMax, | ||
}; | ||
@@ -213,3 +251,3 @@ }; | ||
async updateReadings() { | ||
const { outdoorTemperatureNow, temperatureNow, tankTemperatureNow, tankTemperatureSet, tankHeatingCoolingState, isActive, ecoModeIsActive, comfortModeIsActive, tankTemperatureMax, tankTemperatureMin, tankTargetHeatingCoolingState, heatingCoolingState, targetHeatingCoolingState, } = await this.getReadings(true); | ||
const { outdoorTemperatureNow, temperatureNow, tankTemperatureNow, tankTemperatureSet, tankHeatingCoolingState, isActive, ecoModeIsActive, comfortModeIsActive, tankTemperatureMax, tankTemperatureMin, tankTargetHeatingCoolingState, heatingCoolingState, targetHeatingCoolingState, targetTempSet, targetTempMax, targetTempMin, } = await this.getReadings(true); | ||
this.service.getCharacteristic(this.platform.Characteristic.CurrentTemperature).updateValue(temperatureNow); | ||
@@ -219,2 +257,7 @@ this.service.getCharacteristic(this.platform.Characteristic.Active).updateValue(isActive); | ||
this.service.getCharacteristic(this.platform.Characteristic.TargetHeatingCoolingState).updateValue(targetHeatingCoolingState); | ||
this.service.getCharacteristic(this.platform.Characteristic.TargetTemperature).setProps({ | ||
minValue: targetTempMin, | ||
maxValue: targetTempMax, | ||
minStep: 1, | ||
}).updateValue(targetTempSet); | ||
this.outdoorTemperatureService.getCharacteristic(this.platform.Characteristic.CurrentTemperature).updateValue(outdoorTemperatureNow); | ||
@@ -221,0 +264,0 @@ this.outdoorTemperatureService.getCharacteristic(this.platform.Characteristic.StatusActive).updateValue(true); |
{ | ||
"displayName": "Homebridge Panasonic Heat Pump", | ||
"name": "homebridge-panasonic-heat-pump", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Allows basic control of Panasonic Heat Pump (AQUAREA)", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
186513
3528