From f160a92f9267d1461e19f3dd62b2843e78395d59 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Mon, 4 Jun 2018 10:34:47 +0200 Subject: [PATCH] add shutter interfaces --- libnymea/interfaces/blind.json | 3 +++ libnymea/interfaces/closable.json | 2 +- libnymea/interfaces/interfaces.qrc | 2 ++ libnymea/interfaces/shutter.json | 2 +- libnymea/interfaces/simpleclosable.json | 13 +++++++++++++ 5 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 libnymea/interfaces/blind.json create mode 100644 libnymea/interfaces/simpleclosable.json diff --git a/libnymea/interfaces/blind.json b/libnymea/interfaces/blind.json new file mode 100644 index 00000000..79b21a7c --- /dev/null +++ b/libnymea/interfaces/blind.json @@ -0,0 +1,3 @@ +{ + "extends": "simpleclosable" +} diff --git a/libnymea/interfaces/closable.json b/libnymea/interfaces/closable.json index 71e89f4c..04e5aca1 100644 --- a/libnymea/interfaces/closable.json +++ b/libnymea/interfaces/closable.json @@ -2,7 +2,7 @@ "states": [ { "name": "state", - "type": "String", + "type": "QString", "allowedValues": ["open", "closed", "opening", "closing"] } ], diff --git a/libnymea/interfaces/interfaces.qrc b/libnymea/interfaces/interfaces.qrc index c2f3a390..4ff9bbf8 100644 --- a/libnymea/interfaces/interfaces.qrc +++ b/libnymea/interfaces/interfaces.qrc @@ -30,6 +30,8 @@ closable.json door.json shutter.json + simpleclosable.json + blind.json diff --git a/libnymea/interfaces/shutter.json b/libnymea/interfaces/shutter.json index 18140ee9..79b21a7c 100644 --- a/libnymea/interfaces/shutter.json +++ b/libnymea/interfaces/shutter.json @@ -1,3 +1,3 @@ { - "extends": "closable" + "extends": "simpleclosable" } diff --git a/libnymea/interfaces/simpleclosable.json b/libnymea/interfaces/simpleclosable.json new file mode 100644 index 00000000..4a9c6b91 --- /dev/null +++ b/libnymea/interfaces/simpleclosable.json @@ -0,0 +1,13 @@ +{ + "actions": [ + { + "name": "open" + }, + { + "name": "close" + }, + { + "name": "stop" + } + ] +}