Update config to use async_add_executor_job (#41452)

This commit is contained in:
J. Nick Koston authored and GitHub committed 2020-10-08 09:20:39 +02:00
1 parent 8a374590e8
commit ad5273ded1
2 files changed
+2 -2

No files matched your search

+1 -1
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
+1 -1
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))