mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +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."""
|
||||
import logging
|
||||
from typing import Callable, List, Optional
|
||||
|
||||
from gogogate2_api.common import AbstractDoor, DoorStatus, get_configured_doors
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.cover import (
|
||||
DEVICE_CLASS_GARAGE,
|
||||
@ -12,14 +12,7 @@ from homeassistant.components.cover import (
|
||||
CoverEntity,
|
||||
)
|
||||
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
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
from .common import (
|
||||
@ -27,24 +20,19 @@ from .common import (
|
||||
GoGoGate2Entity,
|
||||
get_data_update_coordinator,
|
||||
)
|
||||
from .const import DEVICE_TYPE_GOGOGATE2, DEVICE_TYPE_ISMARTGATE, DOMAIN
|
||||
from .const import DOMAIN
|
||||
|
||||
COVER_SCHEMA = vol.Schema(
|
||||
{
|
||||
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,
|
||||
}
|
||||
)
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_platform(
|
||||
hass: HomeAssistant, config: dict, add_entities: Callable, discovery_info=None
|
||||
) -> None:
|
||||
"""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.config_entries.flow.async_init(
|
||||
DOMAIN, context={"source": SOURCE_IMPORT}, data=config
|
||||
|
Loading…
x
Reference in New Issue
Block a user