mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 06:47:09 +00:00
Remove unused import code from powerview (#67834)
This commit is contained in:
parent
c374435282
commit
aed2c1cce8
@ -4,21 +4,16 @@ from __future__ import annotations
|
|||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from aiopvapi.resources.scene import Scene as PvScene
|
from aiopvapi.resources.scene import Scene as PvScene
|
||||||
import voluptuous as vol
|
|
||||||
|
|
||||||
from homeassistant.components.scene import Scene
|
from homeassistant.components.scene import Scene
|
||||||
from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import CONF_HOST, CONF_PLATFORM
|
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
import homeassistant.helpers.config_validation as cv
|
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
|
||||||
|
|
||||||
from .const import (
|
from .const import (
|
||||||
COORDINATOR,
|
COORDINATOR,
|
||||||
DEVICE_INFO,
|
DEVICE_INFO,
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
HUB_ADDRESS,
|
|
||||||
PV_API,
|
PV_API,
|
||||||
PV_ROOM_DATA,
|
PV_ROOM_DATA,
|
||||||
PV_SCENE_DATA,
|
PV_SCENE_DATA,
|
||||||
@ -27,27 +22,6 @@ from .const import (
|
|||||||
)
|
)
|
||||||
from .entity import HDEntity
|
from .entity import HDEntity
|
||||||
|
|
||||||
PLATFORM_SCHEMA = vol.Schema(
|
|
||||||
{vol.Required(CONF_PLATFORM): DOMAIN, vol.Required(HUB_ADDRESS): cv.string}
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_platform(
|
|
||||||
hass: HomeAssistant,
|
|
||||||
config: ConfigType,
|
|
||||||
async_add_entities: AddEntitiesCallback,
|
|
||||||
discovery_info: DiscoveryInfoType | None = None,
|
|
||||||
) -> None:
|
|
||||||
"""Import platform from yaml."""
|
|
||||||
|
|
||||||
hass.async_create_task(
|
|
||||||
hass.config_entries.flow.async_init(
|
|
||||||
DOMAIN,
|
|
||||||
context={"source": SOURCE_IMPORT},
|
|
||||||
data={CONF_HOST: config[HUB_ADDRESS]},
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(
|
async def async_setup_entry(
|
||||||
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
|
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
|
||||||
|
Loading…
x
Reference in New Issue
Block a user