Update config to use async_add_executor_job (#41452)

This commit is contained in:
J. Nick Koston 2020-10-08 02:20:39 -05:00 committed by GitHub
parent 8a374590e8
commit ad5273ded1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -189,7 +189,7 @@ class BaseEditConfigView(HomeAssistantView):
async def read_config(self, hass):
"""Read the config."""
current = await hass.async_add_job(_read, hass.config.path(self.path))
current = await hass.async_add_executor_job(_read, hass.config.path(self.path))
if not current:
current = self._empty_config()
return current

View file

@ -54,7 +54,7 @@ class ZWaveLogView(HomeAssistantView):
return Response(text="Invalid datetime", status=HTTP_BAD_REQUEST)
hass = request.app["hass"]
response = await hass.async_add_job(self._get_log, hass, lines)
response = await hass.async_add_executor_job(self._get_log, hass, lines)
return Response(text="\n".join(response))