Remove HomeAssistantType alias from entity components - Part 2 (#48468)

This commit is contained in:
Franck Nijhof 2021-03-30 01:24:56 +02:00 committed by GitHub
parent 855b68faa1
commit c1d5638739
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 79 additions and 99 deletions

View file

@ -16,7 +16,7 @@ from homeassistant.const import (
SERVICE_TURN_ON,
STATE_ON,
)
from homeassistant.core import callback
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers import collection
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import ToggleEntity
@ -24,7 +24,7 @@ from homeassistant.helpers.entity_component import EntityComponent
from homeassistant.helpers.restore_state import RestoreEntity
import homeassistant.helpers.service
from homeassistant.helpers.storage import Store
from homeassistant.helpers.typing import ConfigType, HomeAssistantType, ServiceCallType
from homeassistant.helpers.typing import ConfigType, ServiceCallType
from homeassistant.loader import bind_hass
DOMAIN = "input_boolean"
@ -82,7 +82,7 @@ def is_on(hass, entity_id):
return hass.states.is_state(entity_id, STATE_ON)
async def async_setup(hass: HomeAssistantType, config: ConfigType) -> bool:
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Set up an input boolean."""
component = EntityComponent(_LOGGER, DOMAIN, hass)
id_manager = collection.IDManager()

View file

@ -12,8 +12,7 @@ from homeassistant.const import (
STATE_OFF,
STATE_ON,
)
from homeassistant.core import Context, State
from homeassistant.helpers.typing import HomeAssistantType
from homeassistant.core import Context, HomeAssistant, State
from . import DOMAIN
@ -21,7 +20,7 @@ _LOGGER = logging.getLogger(__name__)
async def _async_reproduce_states(
hass: HomeAssistantType,
hass: HomeAssistant,
state: State,
*,
context: Context | None = None,
@ -55,7 +54,7 @@ async def _async_reproduce_states(
async def async_reproduce_states(
hass: HomeAssistantType,
hass: HomeAssistant,
states: Iterable[State],
*,
context: Context | None = None,