Update config to use async_add_executor_job (#41452)
This commit is contained in:
parent
8a374590e8
commit
ad5273ded1
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue