mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Remove unused COVER_SCHEMA from gogogate2 cover (#47170)
This commit is contained in:
parent
40c28aa38a
commit
514516bacc
@ -1,8 +1,8 @@
|
|||||||
"""Support for Gogogate2 garage Doors."""
|
"""Support for Gogogate2 garage Doors."""
|
||||||
|
import logging
|
||||||
from typing import Callable, List, Optional
|
from typing import Callable, List, Optional
|
||||||
|
|
||||||
from gogogate2_api.common import AbstractDoor, DoorStatus, get_configured_doors
|
from gogogate2_api.common import AbstractDoor, DoorStatus, get_configured_doors
|
||||||
import voluptuous as vol
|
|
||||||
|
|
||||||
from homeassistant.components.cover import (
|
from homeassistant.components.cover import (
|
||||||
DEVICE_CLASS_GARAGE,
|
DEVICE_CLASS_GARAGE,
|
||||||
@ -12,14 +12,7 @@ from homeassistant.components.cover import (
|
|||||||
CoverEntity,
|
CoverEntity,
|
||||||
)
|
)
|
||||||
from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
|
from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
|
||||||
from homeassistant.const import (
|
|
||||||
CONF_DEVICE,
|
|
||||||
CONF_IP_ADDRESS,
|
|
||||||
CONF_PASSWORD,
|
|
||||||
CONF_USERNAME,
|
|
||||||
)
|
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
import homeassistant.helpers.config_validation as cv
|
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
|
|
||||||
from .common import (
|
from .common import (
|
||||||
@ -27,24 +20,19 @@ from .common import (
|
|||||||
GoGoGate2Entity,
|
GoGoGate2Entity,
|
||||||
get_data_update_coordinator,
|
get_data_update_coordinator,
|
||||||
)
|
)
|
||||||
from .const import DEVICE_TYPE_GOGOGATE2, DEVICE_TYPE_ISMARTGATE, DOMAIN
|
from .const import DOMAIN
|
||||||
|
|
||||||
COVER_SCHEMA = vol.Schema(
|
_LOGGER = logging.getLogger(__name__)
|
||||||
{
|
|
||||||
vol.Required(CONF_IP_ADDRESS): cv.string,
|
|
||||||
vol.Required(CONF_DEVICE, default=DEVICE_TYPE_GOGOGATE2): vol.In(
|
|
||||||
(DEVICE_TYPE_GOGOGATE2, DEVICE_TYPE_ISMARTGATE)
|
|
||||||
),
|
|
||||||
vol.Required(CONF_PASSWORD): cv.string,
|
|
||||||
vol.Required(CONF_USERNAME): cv.string,
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_platform(
|
async def async_setup_platform(
|
||||||
hass: HomeAssistant, config: dict, add_entities: Callable, discovery_info=None
|
hass: HomeAssistant, config: dict, add_entities: Callable, discovery_info=None
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Convert old style file configs to new style configs."""
|
"""Convert old style file configs to new style configs."""
|
||||||
|
_LOGGER.warning(
|
||||||
|
"Loading gogogate2 via platform config is deprecated. The configuration"
|
||||||
|
" has been migrated to a config entry and can be safely removed."
|
||||||
|
)
|
||||||
hass.async_create_task(
|
hass.async_create_task(
|
||||||
hass.config_entries.flow.async_init(
|
hass.config_entries.flow.async_init(
|
||||||
DOMAIN, context={"source": SOURCE_IMPORT}, data=config
|
DOMAIN, context={"source": SOURCE_IMPORT}, data=config
|
||||||
|
Loading…
x
Reference in New Issue
Block a user