Add schema validation to configuration

This commit is contained in:
Max Winterstein
2021-01-02 16:55:03 +01:00
parent a1be30cd2b
commit 880f5bfe1a
2 changed files with 41 additions and 26 deletions

View File

@@ -4,6 +4,7 @@
- Improve image recration by adding some cache buster - Improve image recration by adding some cache buster
- Change to bashio logs - Change to bashio logs
- Add `log_level` cofiguration option - Add `log_level` cofiguration option
- Add schema validation to configuration
## [0.4.0] - 2021-01-02 ## [0.4.0] - 2021-01-02
- Change base image to `hassioaddons/debian-base` - Change base image to `hassioaddons/debian-base`

View File

@@ -1,6 +1,6 @@
{ {
"name": "Eufy Home Assistant MQTT Bridge", "name": "Eufy Home Assistant MQTT Bridge",
"version":"0.4.0", "version": "0.5.0",
"slug": "eufy-ha-mqtt-bridge", "slug": "eufy-ha-mqtt-bridge",
"description": "Publish events as MQTT messages", "description": "Publish events as MQTT messages",
"arch": [ "arch": [
@@ -21,10 +21,24 @@
"url": "mqtt://192.168.x.x:1883", "url": "mqtt://192.168.x.x:1883",
"username": "homeassistant", "username": "homeassistant",
"password": "homeassistant" "password": "homeassistant"
}
}, },
"schema":false, "log_level": "info"
},
"schema": {
"eufy": {
"username": "str",
"password": "str"
},
"mqtt": {
"url": "str",
"username": "str?",
"password": "str?"
},
"log_level": "list(error|warn|info|http|verbose|debug|silly)"
},
"stage": "experimental", "stage": "experimental",
"url": "https://github.com/matijse/eufy-ha-mqtt-bridge/", "url": "https://github.com/matijse/eufy-ha-mqtt-bridge/",
"map": ["share:rw"] "map": [
"share:rw"
]
} }