Skip to content

Commit

Permalink
feat: Config-UI-X settings schema support
Browse files Browse the repository at this point in the history
  • Loading branch information
QuickSander committed May 14, 2020
1 parent def9488 commit c93d76d
Showing 1 changed file with 119 additions and 5 deletions.
124 changes: 119 additions & 5 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"pluginAlias": "HttpCurtain",
"pluginType": "accessory",
"singular": false,
"headerDisplay": "Integrate HTTP based curtain controllers. Supports push notifications via [homebridge-http-notification-server](https://github.com/Supereg/homebridge-http-notification-server).",
"headerDisplay": "Integrate HTTP based curtain controllers. Supports push notifications via [homebridge-http-notification-server](https://github.com/Supereg/homebridge-http-notification-server). Edit config file directly for advanced URL control.",
"footerDisplay": "",
"schema": {
"type": "object",
Expand Down Expand Up @@ -43,6 +43,10 @@
"typeahead": { "source": [
"GET", "PUT", "POST", "DELETE", "HEAD"
]}
},
"body": {
"type": "string",
"required": false
}
}
},
Expand All @@ -53,8 +57,8 @@
"url": {
"type": "string",
"title": "URL",
"description": "Not used by Home app, but here for HomeKit completess.",
"required": false,
"default": "http://my-curtain.local/api/v1/state",
"format": "uri"
},
"method": {
Expand All @@ -74,6 +78,7 @@
"url": {
"type": "string",
"title": "URL",
"description": "%d gets replaced by integer between 0-100.",
"required": false,
"default": "http://my-curtain.local/api/v1/pos/%d",
"format": "uri"
Expand All @@ -88,6 +93,47 @@
}
}
},
"getTargetPosUrl": {
"type": "object",
"title": "Get Target Position URL",
"properties": {
"url": {
"type": "string",
"title": "URL",
"required": false,
"format": "uri"
},
"method": {
"type": "string",
"required": false,
"default": "GET",
"typeahead": { "source": [
"GET", "PUT", "POST", "DELETE", "HEAD"
]}
}
}
},
"identifyUrl": {
"type": "object",
"title": "HomeKit Identify URL",
"properties": {
"url": {
"type": "string",
"title": "URL",
"description": "Fill to support HomeKit identify request supported by (for example) the Eve Home app.",
"required": false,
"format": "uri"
},
"method": {
"type": "string",
"required": false,
"default": "GET",
"typeahead": { "source": [
"GET", "PUT", "POST", "DELETE", "HEAD"
]}
}
}
},
"pullInterval": {
"title": "Pull interval [ms]",
"type": "integer",
Expand Down Expand Up @@ -135,14 +181,82 @@
},
{
"type": "fieldset",
"title": "State retrieval",
"title": "Getters",
"expandable": true,
"flex-flow": "row wrap",
"displayFlex": true,
"flex-direction": "row",
"items": [
{
"type": "flex",
"flex-flow": "row wrap",
"title": "Get Current Position",
"items": [
"getCurrentPosUrl.url",
"getCurrentPosUrl.method",
"getCurrentPosUrl.body"
]
},
{
"type": "flex",
"flex-flow": "row wrap",
"title": "Get Target Position",
"items": [
"getTargetPosUrl.url",
"getTargetPosUrl.method"
]
},
{
"type": "flex",
"flex-flow": "row wrap",
"title": "Get Position State",
"items": [
"getPositionStateUrl.url",
"getPositionStateUrl.method"
]
}
]
},

{
"type": "fieldset",
"title": "Setters",
"expandable": true,
"flex-flow": "row wrap",
"displayFlex": true,
"flex-direction": "row",
"items": [
"getPositionStateUrl.url",
"getPositionStateUrl.method"
{
"type": "flex",
"flex-flow": "row wrap",
"title": "Set Target Position",
"items": [
"setTargetPosUrl.url",
"setTargetPosUrl.method"
]
}
]
},

{
"type": "fieldset",
"title": "Advanced",
"expandable": true,
"flex-flow": "row wrap",
"displayFlex": true,
"flex-direction": "row",
"items": [
"debug",
{
"type": "flex",
"flex-flow": "row wrap",
"title": "Identify",
"items": [
"identifyUrl.url",
"identifyUrl.method"
]
},
"pullInterval"

]
}
Expand Down

0 comments on commit c93d76d

Please sign in to comment.