Remove HomeAssistantType alias from entity components - Part 2 (#48468)
This commit is contained in:
parent
855b68faa1
commit
c1d5638739
27 changed files with 79 additions and 99 deletions
|
@ -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()
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue