Update import for EventStateChangedData [a-h] (#114899)

This commit is contained in:
Marc Mueller 2024-04-04 23:48:36 +02:00 committed by GitHub
parent 0f03079065
commit 3c5089bc3f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
29 changed files with 102 additions and 94 deletions

View File

@ -26,13 +26,12 @@ from homeassistant.const import (
STATE_OFF, STATE_OFF,
STATE_ON, STATE_ON,
) )
from homeassistant.core import Event, HassJob, HomeAssistant from homeassistant.core import Event, EventStateChangedData, HassJob, HomeAssistant
from homeassistant.exceptions import ServiceNotFound from homeassistant.exceptions import ServiceNotFound
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity from homeassistant.helpers.entity import Entity
from homeassistant.helpers.entity_component import EntityComponent from homeassistant.helpers.entity_component import EntityComponent
from homeassistant.helpers.event import ( from homeassistant.helpers.event import (
EventStateChangedData,
async_track_point_in_time, async_track_point_in_time,
async_track_state_change_event, async_track_state_change_event,
) )

View File

@ -19,10 +19,9 @@ from homeassistant.const import (
STATE_UNAVAILABLE, STATE_UNAVAILABLE,
STATE_UNKNOWN, STATE_UNKNOWN,
) )
from homeassistant.core import Event, HomeAssistant from homeassistant.core import Event, EventStateChangedData, HomeAssistant
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entityfilter import FILTER_SCHEMA, EntityFilter from homeassistant.helpers.entityfilter import FILTER_SCHEMA, EntityFilter
from homeassistant.helpers.event import EventStateChangedData
from homeassistant.helpers.typing import ConfigType from homeassistant.helpers.typing import ConfigType
from homeassistant.util import ssl as ssl_util from homeassistant.util import ssl as ssl_util

View File

@ -37,7 +37,7 @@ from homeassistant.const import (
URL_API_TEMPLATE, URL_API_TEMPLATE,
) )
import homeassistant.core as ha import homeassistant.core as ha
from homeassistant.core import Event, HomeAssistant from homeassistant.core import Event, EventStateChangedData, HomeAssistant
from homeassistant.exceptions import ( from homeassistant.exceptions import (
InvalidEntityFormatError, InvalidEntityFormatError,
InvalidStateError, InvalidStateError,
@ -46,7 +46,6 @@ from homeassistant.exceptions import (
Unauthorized, Unauthorized,
) )
from homeassistant.helpers import config_validation as cv, template from homeassistant.helpers import config_validation as cv, template
from homeassistant.helpers.event import EventStateChangedData
from homeassistant.helpers.json import json_dumps, json_fragment from homeassistant.helpers.json import json_dumps, json_fragment
from homeassistant.helpers.service import async_get_all_descriptions from homeassistant.helpers.service import async_get_all_descriptions
from homeassistant.helpers.typing import ConfigType from homeassistant.helpers.typing import ConfigType

View File

@ -28,13 +28,12 @@ from homeassistant.const import (
STATE_UNAVAILABLE, STATE_UNAVAILABLE,
STATE_UNKNOWN, STATE_UNKNOWN,
) )
from homeassistant.core import Event, HomeAssistant, callback from homeassistant.core import Event, EventStateChangedData, HomeAssistant, callback
from homeassistant.exceptions import ConditionError, TemplateError from homeassistant.exceptions import ConditionError, TemplateError
from homeassistant.helpers import condition from homeassistant.helpers import condition
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.event import ( from homeassistant.helpers.event import (
EventStateChangedData,
TrackTemplate, TrackTemplate,
TrackTemplateResult, TrackTemplateResult,
TrackTemplateResultInfo, TrackTemplateResultInfo,

View File

@ -18,12 +18,15 @@ from homeassistant.const import (
CONF_UNIT_OF_MEASUREMENT, CONF_UNIT_OF_MEASUREMENT,
STATE_UNKNOWN, STATE_UNKNOWN,
) )
from homeassistant.core import Event, HomeAssistant, State, callback from homeassistant.core import (
from homeassistant.helpers.entity_platform import AddEntitiesCallback Event,
from homeassistant.helpers.event import (
EventStateChangedData, EventStateChangedData,
async_track_state_change_event, HomeAssistant,
State,
callback,
) )
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.event import async_track_state_change_event
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
from .const import ( from .const import (

View File

@ -41,10 +41,7 @@ from homeassistant.helpers import (
translation, translation,
) )
from homeassistant.helpers.entity_component import EntityComponent from homeassistant.helpers.entity_component import EntityComponent
from homeassistant.helpers.event import ( from homeassistant.helpers.event import async_track_state_added_domain
EventStateChangedData,
async_track_state_added_domain,
)
from homeassistant.util.json import JsonObjectType, json_loads_object from homeassistant.util.json import JsonObjectType, json_loads_object
from .const import DEFAULT_EXPOSED_ATTRIBUTES, DOMAIN from .const import DEFAULT_EXPOSED_ATTRIBUTES, DOMAIN
@ -134,7 +131,9 @@ async def async_setup_default_agent(
async_should_expose(hass, DOMAIN, entity_id) async_should_expose(hass, DOMAIN, entity_id)
@core.callback @core.callback
def async_entity_state_listener(event: core.Event[EventStateChangedData]) -> None: def async_entity_state_listener(
event: core.Event[core.EventStateChangedData],
) -> None:
"""Set expose flag on new entities.""" """Set expose flag on new entities."""
async_should_expose(hass, DOMAIN, event.data["entity_id"]) async_should_expose(hass, DOMAIN, event.data["entity_id"])

View File

@ -19,7 +19,7 @@ from homeassistant.const import (
STATE_UNKNOWN, STATE_UNKNOWN,
UnitOfTime, UnitOfTime,
) )
from homeassistant.core import Event, HomeAssistant, callback from homeassistant.core import Event, EventStateChangedData, HomeAssistant, callback
from homeassistant.helpers import ( from homeassistant.helpers import (
config_validation as cv, config_validation as cv,
device_registry as dr, device_registry as dr,
@ -27,10 +27,7 @@ from homeassistant.helpers import (
) )
from homeassistant.helpers.device_registry import DeviceInfo from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.event import ( from homeassistant.helpers.event import async_track_state_change_event
EventStateChangedData,
async_track_state_change_event,
)
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
from .const import ( from .const import (

View File

@ -37,7 +37,13 @@ from homeassistant.const import (
EVENT_HOMEASSISTANT_STOP, EVENT_HOMEASSISTANT_STOP,
STATE_HOME, STATE_HOME,
) )
from homeassistant.core import Event, HomeAssistant, State, callback from homeassistant.core import (
Event,
EventStateChangedData,
HomeAssistant,
State,
callback,
)
from homeassistant.data_entry_flow import BaseServiceInfo from homeassistant.data_entry_flow import BaseServiceInfo
from homeassistant.helpers import config_validation as cv, discovery_flow from homeassistant.helpers import config_validation as cv, discovery_flow
from homeassistant.helpers.device_registry import ( from homeassistant.helpers.device_registry import (
@ -48,7 +54,6 @@ from homeassistant.helpers.device_registry import (
) )
from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.event import ( from homeassistant.helpers.event import (
EventStateChangedData,
async_track_state_added_domain, async_track_state_added_domain,
async_track_time_interval, async_track_time_interval,
) )

View File

@ -16,10 +16,16 @@ from homeassistant.components import (
script, script,
) )
from homeassistant.const import CONF_ENTITIES, CONF_TYPE from homeassistant.const import CONF_ENTITIES, CONF_TYPE
from homeassistant.core import Event, HomeAssistant, State, callback, split_entity_id from homeassistant.core import (
Event,
EventStateChangedData,
HomeAssistant,
State,
callback,
split_entity_id,
)
from homeassistant.helpers import storage from homeassistant.helpers import storage
from homeassistant.helpers.event import ( from homeassistant.helpers.event import (
EventStateChangedData,
async_track_state_added_domain, async_track_state_added_domain,
async_track_state_removed_domain, async_track_state_removed_domain,
) )

View File

@ -65,11 +65,8 @@ from homeassistant.const import (
STATE_ON, STATE_ON,
STATE_UNAVAILABLE, STATE_UNAVAILABLE,
) )
from homeassistant.core import Event, State from homeassistant.core import Event, EventStateChangedData, State
from homeassistant.helpers.event import ( from homeassistant.helpers.event import async_track_state_change_event
EventStateChangedData,
async_track_state_change_event,
)
from homeassistant.util.json import json_loads from homeassistant.util.json import json_loads
from homeassistant.util.network import is_local from homeassistant.util.network import is_local

View File

@ -33,16 +33,20 @@ from homeassistant.const import (
EVENT_HOMEASSISTANT_CLOSE, EVENT_HOMEASSISTANT_CLOSE,
EVENT_LOGGING_CHANGED, EVENT_LOGGING_CHANGED,
) )
from homeassistant.core import Event, HomeAssistant, ServiceCall, State, callback from homeassistant.core import (
Event,
EventStateChangedData,
HomeAssistant,
ServiceCall,
State,
callback,
)
from homeassistant.exceptions import TemplateError from homeassistant.exceptions import TemplateError
from homeassistant.helpers import template from homeassistant.helpers import template
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
import homeassistant.helpers.device_registry as dr import homeassistant.helpers.device_registry as dr
from homeassistant.helpers.device_registry import format_mac from homeassistant.helpers.device_registry import format_mac
from homeassistant.helpers.event import ( from homeassistant.helpers.event import async_track_state_change_event
EventStateChangedData,
async_track_state_change_event,
)
from homeassistant.helpers.issue_registry import ( from homeassistant.helpers.issue_registry import (
IssueSeverity, IssueSeverity,
async_create_issue, async_create_issue,

View File

@ -35,13 +35,16 @@ from homeassistant.const import (
STATE_UNAVAILABLE, STATE_UNAVAILABLE,
STATE_UNKNOWN, STATE_UNKNOWN,
) )
from homeassistant.core import Event, HomeAssistant, State, callback from homeassistant.core import (
Event,
EventStateChangedData,
HomeAssistant,
State,
callback,
)
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.event import ( from homeassistant.helpers.event import async_track_state_change_event
EventStateChangedData,
async_track_state_change_event,
)
from homeassistant.helpers.reload import async_setup_reload_service from homeassistant.helpers.reload import async_setup_reload_service
from homeassistant.helpers.start import async_at_started from homeassistant.helpers.start import async_at_started
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType, StateType from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType, StateType

View File

@ -45,6 +45,7 @@ from homeassistant.core import (
DOMAIN as HA_DOMAIN, DOMAIN as HA_DOMAIN,
CoreState, CoreState,
Event, Event,
EventStateChangedData,
HomeAssistant, HomeAssistant,
State, State,
callback, callback,
@ -54,7 +55,6 @@ from homeassistant.helpers import condition
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.event import ( from homeassistant.helpers.event import (
EventStateChangedData,
async_track_state_change_event, async_track_state_change_event,
async_track_time_interval, async_track_time_interval,
) )

View File

@ -11,6 +11,7 @@ from homeassistant.const import CONF_EVENT, CONF_PLATFORM, CONF_SOURCE, CONF_ZON
from homeassistant.core import ( from homeassistant.core import (
CALLBACK_TYPE, CALLBACK_TYPE,
Event, Event,
EventStateChangedData,
HassJob, HassJob,
HomeAssistant, HomeAssistant,
State, State,
@ -18,11 +19,7 @@ from homeassistant.core import (
) )
from homeassistant.helpers import condition, config_validation as cv from homeassistant.helpers import condition, config_validation as cv
from homeassistant.helpers.config_validation import entity_domain from homeassistant.helpers.config_validation import entity_domain
from homeassistant.helpers.event import ( from homeassistant.helpers.event import TrackStates, async_track_state_change_filtered
EventStateChangedData,
TrackStates,
async_track_state_change_filtered,
)
from homeassistant.helpers.trigger import TriggerActionType, TriggerInfo from homeassistant.helpers.trigger import TriggerActionType, TriggerInfo
from homeassistant.helpers.typing import ConfigType from homeassistant.helpers.typing import ConfigType

View File

@ -12,6 +12,7 @@ from homeassistant.const import ATTR_ASSUMED_STATE, ATTR_ENTITY_ID, STATE_ON
from homeassistant.core import ( from homeassistant.core import (
CALLBACK_TYPE, CALLBACK_TYPE,
Event, Event,
EventStateChangedData,
HomeAssistant, HomeAssistant,
State, State,
callback, callback,
@ -20,10 +21,7 @@ from homeassistant.core import (
from homeassistant.helpers import start from homeassistant.helpers import start
from homeassistant.helpers.entity import Entity, async_generate_entity_id from homeassistant.helpers.entity import Entity, async_generate_entity_id
from homeassistant.helpers.entity_component import EntityComponent from homeassistant.helpers.entity_component import EntityComponent
from homeassistant.helpers.event import ( from homeassistant.helpers.event import async_track_state_change_event
EventStateChangedData,
async_track_state_change_event,
)
from .const import ATTR_AUTO, ATTR_ORDER, DOMAIN, GROUP_ORDER, REG_KEY from .const import ATTR_AUTO, ATTR_ORDER, DOMAIN, GROUP_ORDER, REG_KEY
from .registry import GroupIntegrationRegistry from .registry import GroupIntegrationRegistry

View File

@ -25,13 +25,10 @@ from homeassistant.const import (
STATE_UNAVAILABLE, STATE_UNAVAILABLE,
STATE_UNKNOWN, STATE_UNKNOWN,
) )
from homeassistant.core import Event, HomeAssistant, callback from homeassistant.core import Event, EventStateChangedData, HomeAssistant, callback
from homeassistant.helpers import config_validation as cv, entity_registry as er from homeassistant.helpers import config_validation as cv, entity_registry as er
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.event import ( from homeassistant.helpers.event import async_track_state_change_event
EventStateChangedData,
async_track_state_change_event,
)
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
from .entity import GroupEntity from .entity import GroupEntity

View File

@ -45,13 +45,17 @@ from homeassistant.const import (
STATE_UNAVAILABLE, STATE_UNAVAILABLE,
STATE_UNKNOWN, STATE_UNKNOWN,
) )
from homeassistant.core import CALLBACK_TYPE, Event, HomeAssistant, State, callback from homeassistant.core import (
CALLBACK_TYPE,
Event,
EventStateChangedData,
HomeAssistant,
State,
callback,
)
from homeassistant.helpers import config_validation as cv, entity_registry as er from homeassistant.helpers import config_validation as cv, entity_registry as er
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.event import ( from homeassistant.helpers.event import async_track_state_change_event
EventStateChangedData,
async_track_state_change_event,
)
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
KEY_ANNOUNCE = "announce" KEY_ANNOUNCE = "announce"

View File

@ -24,6 +24,7 @@ from homeassistant.const import (
from homeassistant.core import ( from homeassistant.core import (
CALLBACK_TYPE, CALLBACK_TYPE,
Event, Event,
EventStateChangedData,
HomeAssistant, HomeAssistant,
State, State,
callback, callback,
@ -31,7 +32,6 @@ from homeassistant.core import (
valid_entity_id, valid_entity_id,
) )
from homeassistant.helpers.event import ( from homeassistant.helpers.event import (
EventStateChangedData,
async_track_point_in_utc_time, async_track_point_in_utc_time,
async_track_state_change_event, async_track_state_change_event,
) )

View File

@ -6,12 +6,15 @@ from datetime import timedelta
import logging import logging
from typing import Any from typing import Any
from homeassistant.core import CALLBACK_TYPE, Event, HomeAssistant, callback from homeassistant.core import (
from homeassistant.exceptions import TemplateError CALLBACK_TYPE,
from homeassistant.helpers.event import ( Event,
EventStateChangedData, EventStateChangedData,
async_track_state_change_event, HomeAssistant,
callback,
) )
from homeassistant.exceptions import TemplateError
from homeassistant.helpers.event import async_track_state_change_event
from homeassistant.helpers.start import async_at_start from homeassistant.helpers.start import async_at_start
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed

View File

@ -6,8 +6,7 @@ from dataclasses import dataclass
import datetime import datetime
from homeassistant.components.recorder import get_instance, history from homeassistant.components.recorder import get_instance, history
from homeassistant.core import Event, HomeAssistant, State from homeassistant.core import Event, EventStateChangedData, HomeAssistant, State
from homeassistant.helpers.event import EventStateChangedData
from homeassistant.helpers.template import Template from homeassistant.helpers.template import Template
import homeassistant.util.dt as dt_util import homeassistant.util.dt as dt_util

View File

@ -22,6 +22,7 @@ from homeassistant.const import (
from homeassistant.core import ( from homeassistant.core import (
CALLBACK_TYPE, CALLBACK_TYPE,
Event, Event,
EventStateChangedData,
HassJob, HassJob,
HomeAssistant, HomeAssistant,
State, State,
@ -34,7 +35,6 @@ from homeassistant.helpers import (
template, template,
) )
from homeassistant.helpers.event import ( from homeassistant.helpers.event import (
EventStateChangedData,
async_track_same_state, async_track_same_state,
async_track_state_change_event, async_track_state_change_event,
) )

View File

@ -13,6 +13,7 @@ from homeassistant.const import CONF_ATTRIBUTE, CONF_FOR, CONF_PLATFORM, MATCH_A
from homeassistant.core import ( from homeassistant.core import (
CALLBACK_TYPE, CALLBACK_TYPE,
Event, Event,
EventStateChangedData,
HassJob, HassJob,
HomeAssistant, HomeAssistant,
State, State,
@ -24,7 +25,6 @@ from homeassistant.helpers import (
template, template,
) )
from homeassistant.helpers.event import ( from homeassistant.helpers.event import (
EventStateChangedData,
async_track_same_state, async_track_same_state,
async_track_state_change_event, async_track_state_change_event,
process_state_match, process_state_match,

View File

@ -16,6 +16,7 @@ from homeassistant.const import (
from homeassistant.core import ( from homeassistant.core import (
CALLBACK_TYPE, CALLBACK_TYPE,
Event, Event,
EventStateChangedData,
HassJob, HassJob,
HomeAssistant, HomeAssistant,
State, State,
@ -23,7 +24,6 @@ from homeassistant.core import (
) )
from homeassistant.helpers import config_validation as cv from homeassistant.helpers import config_validation as cv
from homeassistant.helpers.event import ( from homeassistant.helpers.event import (
EventStateChangedData,
async_track_point_in_time, async_track_point_in_time,
async_track_state_change_event, async_track_state_change_event,
async_track_time_change, async_track_time_change,

View File

@ -45,16 +45,14 @@ from homeassistant.core import (
CALLBACK_TYPE, CALLBACK_TYPE,
Context, Context,
Event, Event,
EventStateChangedData,
HomeAssistant, HomeAssistant,
State, State,
callback as ha_callback, callback as ha_callback,
split_entity_id, split_entity_id,
) )
from homeassistant.helpers.dispatcher import async_dispatcher_send from homeassistant.helpers.dispatcher import async_dispatcher_send
from homeassistant.helpers.event import ( from homeassistant.helpers.event import async_track_state_change_event
EventStateChangedData,
async_track_state_change_event,
)
from homeassistant.util.decorator import Registry from homeassistant.util.decorator import Registry
from .const import ( from .const import (

View File

@ -17,9 +17,14 @@ from pyhap.util import callback as pyhap_callback
from homeassistant.components import camera from homeassistant.components import camera
from homeassistant.components.ffmpeg import get_ffmpeg_manager from homeassistant.components.ffmpeg import get_ffmpeg_manager
from homeassistant.const import STATE_ON from homeassistant.const import STATE_ON
from homeassistant.core import Event, HomeAssistant, State, callback from homeassistant.core import (
from homeassistant.helpers.event import ( Event,
EventStateChangedData, EventStateChangedData,
HomeAssistant,
State,
callback,
)
from homeassistant.helpers.event import (
async_track_state_change_event, async_track_state_change_event,
async_track_time_interval, async_track_time_interval,
) )

View File

@ -34,11 +34,8 @@ from homeassistant.const import (
STATE_OPEN, STATE_OPEN,
STATE_OPENING, STATE_OPENING,
) )
from homeassistant.core import Event, State, callback from homeassistant.core import Event, EventStateChangedData, State, callback
from homeassistant.helpers.event import ( from homeassistant.helpers.event import async_track_state_change_event
EventStateChangedData,
async_track_state_change_event,
)
from .accessories import TYPES, HomeAccessory from .accessories import TYPES, HomeAccessory
from .const import ( from .const import (

View File

@ -25,11 +25,8 @@ from homeassistant.const import (
SERVICE_TURN_ON, SERVICE_TURN_ON,
STATE_ON, STATE_ON,
) )
from homeassistant.core import Event, State, callback from homeassistant.core import Event, EventStateChangedData, State, callback
from homeassistant.helpers.event import ( from homeassistant.helpers.event import async_track_state_change_event
EventStateChangedData,
async_track_state_change_event,
)
from .accessories import TYPES, HomeAccessory from .accessories import TYPES, HomeAccessory
from .const import ( from .const import (

View File

@ -38,9 +38,15 @@ from homeassistant.const import (
CONF_TYPE, CONF_TYPE,
UnitOfTemperature, UnitOfTemperature,
) )
from homeassistant.core import Event, HomeAssistant, State, callback, split_entity_id from homeassistant.core import (
Event,
EventStateChangedData,
HomeAssistant,
State,
callback,
split_entity_id,
)
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.event import EventStateChangedData
from homeassistant.helpers.storage import STORAGE_DIR from homeassistant.helpers.storage import STORAGE_DIR
from homeassistant.util.unit_conversion import TemperatureConverter from homeassistant.util.unit_conversion import TemperatureConverter

View File

@ -23,12 +23,9 @@ from homeassistant.const import (
STATE_ON, STATE_ON,
STATE_UNAVAILABLE, STATE_UNAVAILABLE,
) )
from homeassistant.core import Event, HomeAssistant, callback from homeassistant.core import Event, EventStateChangedData, HomeAssistant, callback
from homeassistant.helpers import entity_registry as er from homeassistant.helpers import entity_registry as er
from homeassistant.helpers.event import ( from homeassistant.helpers.event import async_track_state_change_event
EventStateChangedData,
async_track_state_change_event,
)
from .conftest import MockESPHomeDevice from .conftest import MockESPHomeDevice