Skip to content

Commit

Permalink
fix config flow for HA 2023.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hekmon committed Sep 9, 2023
1 parent 9226dc5 commit 9a76372
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions custom_components/rtetempo/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import voluptuous as vol

from homeassistant import config_entries
from homeassistant.core import HomeAssistant, callback
from homeassistant.core import callback
from homeassistant.data_entry_flow import FlowResult

from .api_worker import BadRequest, ServerError, UnexpectedError, application_tester
Expand Down Expand Up @@ -47,8 +47,7 @@ async def async_step_user(
try:
client_id = user_input[CONFIG_CLIENT_ID]
client_secret = user_input[CONFIG_CLIEND_SECRET]
hass = HomeAssistant()
await hass.async_add_executor_job(
await self.hass.async_add_executor_job(
lambda: application_tester(str(client_id), str(client_secret))
)
except RequestException as request_exception:
Expand Down

0 comments on commit 9a76372

Please sign in to comment.