Rework heating/cooling/thermostat interfaces

Simple heating/cooling devices are more different to thermostats
than one would think at first. This splits heating and thermostat
interfaces into two unrelated interfaces and adds a generic
cooling interface for simple on/off air conditioners.
This commit is contained in:
Michael Zanetti 2020-12-29 13:17:08 +01:00
parent eaaf2e0188
commit d6fd4bfba5
5 changed files with 55 additions and 26 deletions

View File

@ -0,0 +1,15 @@
{
"description": "The cooling interface defines basic cooling appliances.",
"extends": "power",
"states": [
{
"name": "percentage",
"type": "int",
"min": 0,
"max": 100,
"unit": "Percentage",
"writable": true,
"optional": true
}
]
}

View File

@ -1,14 +0,0 @@
{
"description": "The extendedheating interface defines heating appliances which can also be controlled with a percentage range. When implementing such a device class, do not set power to true when the percentage is set.",
"extends": "heating",
"states": [
{
"name": "percentage",
"type": "int",
"min": 0,
"max": 100,
"unit": "Percentage",
"writable": true
}
]
}

View File

@ -1,4 +1,15 @@
{
"description": "The heating interface defines basic heating appliances.",
"extends": "power"
"extends": "power",
"states": [
{
"name": "percentage",
"type": "int",
"min": 0,
"max": 100,
"unit": "Percentage",
"writable": true,
"optional": true
}
]
}

View File

@ -1,6 +1,7 @@
<RCC>
<qresource prefix="/interfaces">
<file>alert.json</file>
<file>cooling.json</file>
<file>light.json</file>
<file>dimmablelight.json</file>
<file>account.json</file>
@ -65,7 +66,6 @@
<file>fingerprintreader.json</file>
<file>useraccesscontrol.json</file>
<file>heating.json</file>
<file>extendedheating.json</file>
<file>evcharger.json</file>
<file>extendedevcharger.json</file>
<file>noisesensor.json</file>

View File

@ -1,12 +1,29 @@
{
"description": "The thermostat interface describes devices which have a target temperature value and regulate themselves to match that target temperature. Often combined with the power and temperaturesensor interfaces.",
"states": [
{
"name": "targetTemperature",
"type": "double",
"unit": "DegreeCelsius",
"minValue": "any",
"maxValue": "any"
}
]
"description": "The thermostat interface describes devices which have a target temperature value and regulate themselves to match that target temperature.",
"states": [
{
"name": "targetTemperature",
"type": "double",
"unit": "DegreeCelsius",
"minValue": "any",
"maxValue": "any",
"writable": true
},
{
"name": "temperature",
"type": "double",
"unit": "DegreeCelsius",
"optional": true
},
{
"name": "heatingOn",
"type": "bool",
"optional": true
},
{
"name": "coolingOn",
"type": "bool",
"optional": true
}
]
}