Bugfix Check Config for Home-Assistant (#350)

* add logger

* Bugfix config check
This commit is contained in:
Pascal Vizeli
2018-02-10 00:10:30 +01:00
committed by GitHub
parent e939c29efa
commit 23c35d4c80
4 changed files with 20 additions and 14 deletions

View File

@@ -136,8 +136,8 @@ class APIHomeAssistant(CoreSysAttributes):
@api_process
async def check(self, request):
"""Check config of homeassistant."""
code, message = await self._homeassistant.check_config()
if not code:
raise RuntimeError(message)
result = await self._homeassistant.check_config()
if not result.valid:
raise RuntimeError(result.log)
return True