Skip to content

Commit 9a76372

Browse files
committed
fix config flow for HA 2023.9.0
1 parent 9226dc5 commit 9a76372

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

custom_components/rtetempo/config_flow.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import voluptuous as vol
1010

1111
from homeassistant import config_entries
12-
from homeassistant.core import HomeAssistant, callback
12+
from homeassistant.core import callback
1313
from homeassistant.data_entry_flow import FlowResult
1414

1515
from .api_worker import BadRequest, ServerError, UnexpectedError, application_tester
@@ -47,8 +47,7 @@ async def async_step_user(
4747
try:
4848
client_id = user_input[CONFIG_CLIENT_ID]
4949
client_secret = user_input[CONFIG_CLIEND_SECRET]
50-
hass = HomeAssistant()
51-
await hass.async_add_executor_job(
50+
await self.hass.async_add_executor_job(
5251
lambda: application_tester(str(client_id), str(client_secret))
5352
)
5453
except RequestException as request_exception:

0 commit comments

Comments
 (0)