add a door interface
This commit is contained in:
parent
a3757e7fb3
commit
3a862e2050
17
libnymea/interfaces/closable.json
Normal file
17
libnymea/interfaces/closable.json
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"states": [
|
||||||
|
{
|
||||||
|
"name": "state",
|
||||||
|
"type": "String",
|
||||||
|
"allowedValues": ["open", "closed", "opening", "closing"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"name": "open"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "close"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
14
libnymea/interfaces/door.json
Normal file
14
libnymea/interfaces/door.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"extends": "closable",
|
||||||
|
"states": [
|
||||||
|
{
|
||||||
|
"name": "latched",
|
||||||
|
"type": "bool"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"name": "unlatch"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -1,18 +1,12 @@
|
|||||||
{
|
{
|
||||||
|
"extends": "closable",
|
||||||
"states": [
|
"states": [
|
||||||
{
|
{
|
||||||
"name": "gateState",
|
"name": "intermediatePosition",
|
||||||
"type": "String",
|
"type": "bool"
|
||||||
"allowedValues": ["open", "closed", "intermediate", "opening", "closing"]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"actions": [
|
"actions": [
|
||||||
{
|
|
||||||
"name": "open"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "close"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "stop"
|
"name": "stop"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -27,6 +27,8 @@
|
|||||||
<file>inputtrigger.json</file>
|
<file>inputtrigger.json</file>
|
||||||
<file>outputtrigger.json</file>
|
<file>outputtrigger.json</file>
|
||||||
<file>power.json</file>
|
<file>power.json</file>
|
||||||
|
<file>closable.json</file>
|
||||||
|
<file>door.json</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/"/>
|
<qresource prefix="/"/>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
Reference in New Issue
Block a user