Integrations h* - i*: Rename HomeAssistantType to HomeAssistant. (#49587)

This commit is contained in:
jan iversen 2021-04-23 10:11:58 +02:00 committed by GitHub
parent a396619251
commit 9685cefba4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 143 additions and 156 deletions

View file

@ -20,7 +20,7 @@ from homeassistant.helpers.dispatcher import (
async_dispatcher_connect,
async_dispatcher_send,
)
from homeassistant.helpers.typing import ConfigType, HomeAssistantType
from homeassistant.helpers.typing import ConfigType
from .const import (
CONF_INSTANCE_CLIENTS,
@ -290,16 +290,12 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
return True
async def _async_entry_updated(
hass: HomeAssistantType, config_entry: ConfigEntry
) -> None:
async def _async_entry_updated(hass: HomeAssistant, config_entry: ConfigEntry) -> None:
"""Handle entry updates."""
await hass.config_entries.async_reload(config_entry.entry_id)
async def async_unload_entry(
hass: HomeAssistantType, config_entry: ConfigEntry
) -> bool:
async def async_unload_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> bool:
"""Unload a config entry."""
unload_ok = all(
await asyncio.gather(

View file

@ -19,12 +19,11 @@ from homeassistant.components.light import (
LightEntity,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import callback
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.dispatcher import (
async_dispatcher_connect,
async_dispatcher_send,
)
from homeassistant.helpers.typing import HomeAssistantType
import homeassistant.util.color as color_util
from . import (
@ -81,7 +80,7 @@ ICON_EXTERNAL_SOURCE = "mdi:television-ambient-light"
async def async_setup_entry(
hass: HomeAssistantType, config_entry: ConfigEntry, async_add_entities: Callable
hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: Callable
) -> bool:
"""Set up a Hyperion platform from config entry."""

View file

@ -26,12 +26,11 @@ from hyperion.const import (
from homeassistant.components.switch import SwitchEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import callback
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.dispatcher import (
async_dispatcher_connect,
async_dispatcher_send,
)
from homeassistant.helpers.typing import HomeAssistantType
from homeassistant.util import slugify
from . import (
@ -82,7 +81,7 @@ def _component_to_switch_name(component: str, instance_name: str) -> str:
async def async_setup_entry(
hass: HomeAssistantType, config_entry: ConfigEntry, async_add_entities: Callable
hass: HomeAssistant, config_entry: ConfigEntry, async_add_entities: Callable
) -> bool:
"""Set up a Hyperion platform from config entry."""
entry_data = hass.data[DOMAIN][config_entry.entry_id]