mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Change HomeAssistantType -> HomeAssistant in modbus (#49400)
This commit is contained in:
parent
cf51e07953
commit
0f90678e0e
@ -21,13 +21,10 @@ from homeassistant.const import (
|
||||
CONF_SCAN_INTERVAL,
|
||||
CONF_SLAVE,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
from homeassistant.helpers.event import async_track_time_interval
|
||||
from homeassistant.helpers.typing import (
|
||||
ConfigType,
|
||||
DiscoveryInfoType,
|
||||
HomeAssistantType,
|
||||
)
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
|
||||
from .const import (
|
||||
CALL_TYPE_COIL,
|
||||
@ -72,7 +69,7 @@ PLATFORM_SCHEMA = vol.All(
|
||||
|
||||
|
||||
async def async_setup_platform(
|
||||
hass: HomeAssistantType,
|
||||
hass: HomeAssistant,
|
||||
config: ConfigType,
|
||||
async_add_entities,
|
||||
discovery_info: DiscoveryInfoType | None = None,
|
||||
|
@ -24,12 +24,9 @@ from homeassistant.const import (
|
||||
TEMP_CELSIUS,
|
||||
TEMP_FAHRENHEIT,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.event import async_track_time_interval
|
||||
from homeassistant.helpers.typing import (
|
||||
ConfigType,
|
||||
DiscoveryInfoType,
|
||||
HomeAssistantType,
|
||||
)
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
|
||||
from .const import (
|
||||
ATTR_TEMPERATURE,
|
||||
@ -56,7 +53,7 @@ _LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_platform(
|
||||
hass: HomeAssistantType,
|
||||
hass: HomeAssistant,
|
||||
config: ConfigType,
|
||||
async_add_entities,
|
||||
discovery_info: DiscoveryInfoType | None = None,
|
||||
|
@ -15,13 +15,10 @@ from homeassistant.const import (
|
||||
CONF_SCAN_INTERVAL,
|
||||
CONF_SLAVE,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.event import async_track_time_interval
|
||||
from homeassistant.helpers.restore_state import RestoreEntity
|
||||
from homeassistant.helpers.typing import (
|
||||
ConfigType,
|
||||
DiscoveryInfoType,
|
||||
HomeAssistantType,
|
||||
)
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
|
||||
from .const import (
|
||||
CALL_TYPE_COIL,
|
||||
@ -40,7 +37,7 @@ from .modbus import ModbusHub
|
||||
|
||||
|
||||
async def async_setup_platform(
|
||||
hass: HomeAssistantType,
|
||||
hass: HomeAssistant,
|
||||
config: ConfigType,
|
||||
async_add_entities,
|
||||
discovery_info: DiscoveryInfoType | None = None,
|
||||
|
@ -27,14 +27,11 @@ from homeassistant.const import (
|
||||
CONF_STRUCTURE,
|
||||
CONF_UNIT_OF_MEASUREMENT,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
from homeassistant.helpers.event import async_track_time_interval
|
||||
from homeassistant.helpers.restore_state import RestoreEntity
|
||||
from homeassistant.helpers.typing import (
|
||||
ConfigType,
|
||||
DiscoveryInfoType,
|
||||
HomeAssistantType,
|
||||
)
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
|
||||
from .const import (
|
||||
CALL_TYPE_REGISTER_HOLDING,
|
||||
@ -117,7 +114,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
|
||||
|
||||
async def async_setup_platform(
|
||||
hass: HomeAssistantType,
|
||||
hass: HomeAssistant,
|
||||
config: ConfigType,
|
||||
async_add_entities,
|
||||
discovery_info: DiscoveryInfoType | None = None,
|
||||
|
@ -21,10 +21,11 @@ from homeassistant.const import (
|
||||
CONF_SWITCHES,
|
||||
STATE_ON,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
from homeassistant.helpers.event import async_track_time_interval
|
||||
from homeassistant.helpers.restore_state import RestoreEntity
|
||||
from homeassistant.helpers.typing import ConfigType, HomeAssistantType
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
|
||||
from .const import (
|
||||
CALL_TYPE_COIL,
|
||||
@ -88,7 +89,7 @@ PLATFORM_SCHEMA = vol.All(
|
||||
|
||||
|
||||
async def async_setup_platform(
|
||||
hass: HomeAssistantType, config: ConfigType, async_add_entities, discovery_info=None
|
||||
hass: HomeAssistant, config: ConfigType, async_add_entities, discovery_info=None
|
||||
):
|
||||
"""Read configuration and create Modbus switches."""
|
||||
switches = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user