From d641833ecadfdf82382d12f1a8a861c5faa53f61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Mon, 11 Jun 2018 10:28:32 +0200 Subject: [PATCH] Add smartlock interface and simplify simpleclosable interface --- libnymea/interfaces/blind.json | 5 +++++ libnymea/interfaces/closable.json | 9 +-------- libnymea/interfaces/shutter.json | 5 +++++ libnymea/interfaces/simpleclosable.json | 3 --- libnymea/interfaces/smartlock.json | 16 ++++++++++++++++ 5 files changed, 27 insertions(+), 11 deletions(-) create mode 100644 libnymea/interfaces/smartlock.json diff --git a/libnymea/interfaces/blind.json b/libnymea/interfaces/blind.json index 79b21a7c..947dac2f 100644 --- a/libnymea/interfaces/blind.json +++ b/libnymea/interfaces/blind.json @@ -1,3 +1,8 @@ { "extends": "simpleclosable" + "actions": [ + { + "name": "stop" + } + ] } diff --git a/libnymea/interfaces/closable.json b/libnymea/interfaces/closable.json index 04e5aca1..7a53ce0c 100644 --- a/libnymea/interfaces/closable.json +++ b/libnymea/interfaces/closable.json @@ -1,17 +1,10 @@ { + "extends": "simpleclosable", "states": [ { "name": "state", "type": "QString", "allowedValues": ["open", "closed", "opening", "closing"] } - ], - "actions": [ - { - "name": "open" - }, - { - "name": "close" - } ] } diff --git a/libnymea/interfaces/shutter.json b/libnymea/interfaces/shutter.json index 79b21a7c..947dac2f 100644 --- a/libnymea/interfaces/shutter.json +++ b/libnymea/interfaces/shutter.json @@ -1,3 +1,8 @@ { "extends": "simpleclosable" + "actions": [ + { + "name": "stop" + } + ] } diff --git a/libnymea/interfaces/simpleclosable.json b/libnymea/interfaces/simpleclosable.json index 4a9c6b91..5a932f7f 100644 --- a/libnymea/interfaces/simpleclosable.json +++ b/libnymea/interfaces/simpleclosable.json @@ -5,9 +5,6 @@ }, { "name": "close" - }, - { - "name": "stop" } ] } diff --git a/libnymea/interfaces/smartlock.json b/libnymea/interfaces/smartlock.json new file mode 100644 index 00000000..50808e41 --- /dev/null +++ b/libnymea/interfaces/smartlock.json @@ -0,0 +1,16 @@ +{ + "extends": "simpleclosable", + "states": [ + { + "name": "state", + "type": "QString", + "allowedValues": ["locked", "locking", "unlocked", "unlocking", "unlatched", "unlatching"] + } + ], + "actions": [ + { + "name": "unlatch" + } + ] +} +