Skip to content

Commit

Permalink
Fix flow
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Mamontov committed Dec 18, 2021
1 parent 331ac6c commit dcbc144
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions custom_components/ledfx/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
CONF_SCAN_INTERVAL,
CONF_TIMEOUT
)
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.helpers.httpx_client import get_async_client

from .core.const import (
DOMAIN,
Expand Down Expand Up @@ -44,9 +44,7 @@ async def async_step_auth(self, user_input):
if user_input is None:
return self.cur_step

session = async_get_clientsession(self.hass, False)

client = LedFx(self.hass.loop, session, user_input[CONF_IP_ADDRESS], user_input[CONF_PORT])
client = LedFx(get_async_client(self.hass, False), user_input[CONF_IP_ADDRESS], user_input[CONF_PORT])

try:
await client.info()
Expand Down Expand Up @@ -106,9 +104,7 @@ async def async_step_settings(self, user_input = None):
})

if user_input:
session = async_get_clientsession(self.hass, False)

client = LedFx(self.hass.loop, session, user_input[CONF_IP_ADDRESS], user_input[CONF_PORT])
client = LedFx(get_async_client(self.hass, False), user_input[CONF_IP_ADDRESS], user_input[CONF_PORT])

try:
await client.info()
Expand Down
2 changes: 1 addition & 1 deletion custom_components/ledfx/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"domain": "ledfx",
"name": "LedFx",
"version": "1.1.0",
"version": "1.1.1",
"documentation": "https://github.com/dmamontov/hass-ledfx",
"issue_tracker": "https://github.com/dmamontov/hass-ledfx/issues",
"config_flow": true,
Expand Down

0 comments on commit dcbc144

Please sign in to comment.