Skip to content

Commit

Permalink
fix await async setup
Browse files Browse the repository at this point in the history
  • Loading branch information
myTselection committed Jul 14, 2024
1 parent 563b8e0 commit f171d52
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions custom_components/pixometer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,10 @@ async def async_setup(hass: HomeAssistant, config: dict):
except ValueError:
pass

hass.async_create_task(
await hass.config_entries.flow.async_init(
await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_IMPORT}, data={}
)
)

return True

async def async_update_options(hass: HomeAssistant, config_entry: ConfigEntry):
Expand All @@ -78,9 +77,8 @@ async def async_unload_entry(hass: HomeAssistant, config_entry: ConfigEntry):

async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> bool:
"""Set up component as config entry."""
hass.async_create_task(
await hass.config_entries.async_forward_entry_setup(config_entry, Platform.SENSOR)
)
await hass.config_entries.async_forward_entry_setup(config_entry, Platform.SENSOR)

return True


Expand Down

0 comments on commit f171d52

Please sign in to comment.