From ffae9361259cb05d1b01643faec7815a04e45d9c Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Sun, 7 Jun 2020 23:47:50 +0200 Subject: [PATCH] Add venetianblind interface And fix a bug in shutter, which should extend closable instead of simpleclosable just like blinds and awnings. --- libnymea/interfaces/interfaces.qrc | 1 + libnymea/interfaces/shutter.json | 2 +- libnymea/interfaces/venetianblind.json | 13 +++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 libnymea/interfaces/venetianblind.json diff --git a/libnymea/interfaces/interfaces.qrc b/libnymea/interfaces/interfaces.qrc index d29e1be4..3fc8c284 100644 --- a/libnymea/interfaces/interfaces.qrc +++ b/libnymea/interfaces/interfaces.qrc @@ -76,5 +76,6 @@ powerswitch.json barcodescanner.json irrigation.json + venetianblind.json diff --git a/libnymea/interfaces/shutter.json b/libnymea/interfaces/shutter.json index 79b21a7c..18140ee9 100644 --- a/libnymea/interfaces/shutter.json +++ b/libnymea/interfaces/shutter.json @@ -1,3 +1,3 @@ { - "extends": "simpleclosable" + "extends": "closable" } diff --git a/libnymea/interfaces/venetianblind.json b/libnymea/interfaces/venetianblind.json new file mode 100644 index 00000000..d17bca57 --- /dev/null +++ b/libnymea/interfaces/venetianblind.json @@ -0,0 +1,13 @@ +{ + "extends": "extendedblind", + "description": "Venetian blinds that can be tilted. Venetian blinds must support an angle and specify the minimum and maximum supported angle. For instance, if a venetian blinds supports tilting from horizontal to vertical by 90°, the minValue should be set to 0° and the maxValue to 90°. For venetian blinds that support tilting both direction, that is, a total of 180°, the minValue should be -90° and the maxValue should be 90°. 0° is always the horizontal position.", + "states": [ + { + "name": "angle", + "type": "double", + "unit": "UnitDegree", + "minValue": "any", + "maxValue": "any" + } + ] +}