Add check_config helper (#24557)
* check_config * no ignore * tests * try tests again
This commit is contained in:
1 parent
236debb455
commit
2e26f0bd2b
7 files changed
+342
-178
No files matched your search
@@ -745,13 +745,13 @@ async def async_check_ha_config_file(hass: HomeAssistant) -> Optional[str]:
|
||||
|
||||
This method is a coroutine.
|
||||
"""
|
||||
from homeassistant.scripts.check_config import check_ha_config_file
|
||||
import homeassistant.helpers.check_config as check_config
|
||||
|
||||
res = await check_ha_config_file(hass) # type: ignore
|
||||
res = await check_config.async_check_ha_config_file(hass)
|
||||
|
||||
if not res.errors:
|
||||
return None
|
||||
return '\n'.join([err.message for err in res.errors])
|
||||
return res.error_str
|
||||
|
||||
|
||||
@callback
|
||||
|
||||
Reference in new issue
Block a user