Merge PR #12: Thermostat: Add a setting to explicitly enable the automatic mode
This commit is contained in:
commit
d53d69c01a
@ -191,6 +191,10 @@ void IntegrationPluginGenericHeatingCooling::executeAction(ThingActionInfo *info
|
|||||||
|
|
||||||
void IntegrationPluginGenericHeatingCooling::thermostatCheckPowerOutputState(Thing *thing)
|
void IntegrationPluginGenericHeatingCooling::thermostatCheckPowerOutputState(Thing *thing)
|
||||||
{
|
{
|
||||||
|
bool autoControl = thing->setting(thermostatSettingsAutoControlParamTypeId).toBool();
|
||||||
|
if (!autoControl) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
double targetTemperature = thing->stateValue(thermostatTargetTemperatureStateTypeId).toDouble();
|
double targetTemperature = thing->stateValue(thermostatTargetTemperatureStateTypeId).toDouble();
|
||||||
double actualTemperature = thing->stateValue(thermostatTemperatureStateTypeId).toDouble();
|
double actualTemperature = thing->stateValue(thermostatTemperatureStateTypeId).toDouble();
|
||||||
double temperatureDifference = thing->setting(thermostatSettingsTemperatureDifferenceParamTypeId).toDouble();
|
double temperatureDifference = thing->setting(thermostatSettingsTemperatureDifferenceParamTypeId).toDouble();
|
||||||
|
|||||||
@ -89,15 +89,6 @@
|
|||||||
"createMethods": ["user"],
|
"createMethods": ["user"],
|
||||||
"interfaces": ["thermostat"],
|
"interfaces": ["thermostat"],
|
||||||
"settingsTypes": [
|
"settingsTypes": [
|
||||||
{
|
|
||||||
"id": "64bf308f-a543-4e02-b787-1a1714c1f978",
|
|
||||||
"name": "temperatureDifference",
|
|
||||||
"displayName": "Temperature difference",
|
|
||||||
"type": "double",
|
|
||||||
"unit": "DegreeCelsius",
|
|
||||||
"minValue": 0.00,
|
|
||||||
"defaultValue": 2.00
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"id": "67451c97-50e1-4ea6-ac43-4386fbd26698",
|
"id": "67451c97-50e1-4ea6-ac43-4386fbd26698",
|
||||||
"name": "minTargetTemperature",
|
"name": "minTargetTemperature",
|
||||||
@ -117,6 +108,22 @@
|
|||||||
"minValue": -99,
|
"minValue": -99,
|
||||||
"maxValue": 100,
|
"maxValue": 100,
|
||||||
"defaultValue": 50
|
"defaultValue": 50
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "d14676ba-6f7d-439f-ac67-3e91788c9ed1",
|
||||||
|
"name": "autoControl",
|
||||||
|
"displayName": "Auto heating/cooling",
|
||||||
|
"type": "bool",
|
||||||
|
"defaultValue": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "64bf308f-a543-4e02-b787-1a1714c1f978",
|
||||||
|
"name": "temperatureDifference",
|
||||||
|
"displayName": "Temperature difference",
|
||||||
|
"type": "double",
|
||||||
|
"unit": "DegreeCelsius",
|
||||||
|
"minValue": 0.00,
|
||||||
|
"defaultValue": 2.00
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"stateTypes": [
|
"stateTypes": [
|
||||||
|
|||||||
Reference in New Issue
Block a user