mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 00:37:53 +00:00
Remove async_setup from hyperion (#93894)
This commit is contained in:
parent
4e5902c15b
commit
4f153a8f90
@ -19,7 +19,6 @@ from homeassistant.helpers.dispatcher import (
|
||||
async_dispatcher_connect,
|
||||
async_dispatcher_send,
|
||||
)
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
|
||||
from .const import (
|
||||
CONF_INSTANCE_CLIENTS,
|
||||
@ -104,12 +103,6 @@ async def async_create_connect_hyperion_client(
|
||||
return hyperion_client
|
||||
|
||||
|
||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
"""Set up Hyperion component."""
|
||||
hass.data[DOMAIN] = {}
|
||||
return True
|
||||
|
||||
|
||||
@callback
|
||||
def listen_for_instance_updates(
|
||||
hass: HomeAssistant,
|
||||
@ -191,6 +184,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
# We need 1 root client (to manage instances being removed/added) and then 1 client
|
||||
# per Hyperion server instance which is shared for all entities associated with
|
||||
# that instance.
|
||||
hass.data.setdefault(DOMAIN, {})
|
||||
hass.data[DOMAIN][entry.entry_id] = {
|
||||
CONF_ROOT_CLIENT: hyperion_client,
|
||||
CONF_INSTANCE_CLIENTS: {},
|
||||
|
@ -150,8 +150,6 @@ async def _configure_flow(
|
||||
user_input = user_input or {}
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.hyperion.async_setup", return_value=True
|
||||
), patch(
|
||||
"homeassistant.components.hyperion.async_setup_entry",
|
||||
return_value=True,
|
||||
):
|
||||
@ -836,9 +834,7 @@ async def test_reauth_success(hass: HomeAssistant) -> None:
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.hyperion.client.HyperionClient", return_value=client
|
||||
), patch("homeassistant.components.hyperion.async_setup", return_value=True), patch(
|
||||
"homeassistant.components.hyperion.async_setup_entry", return_value=True
|
||||
):
|
||||
), patch("homeassistant.components.hyperion.async_setup_entry", return_value=True):
|
||||
result = await _init_flow(
|
||||
hass,
|
||||
source=SOURCE_REAUTH,
|
||||
|
Loading…
x
Reference in New Issue
Block a user