Force alias when importing climate PLATFORM_SCHEMA (#120518)

pull/120522/head
epenet 2024-06-26 10:55:09 +02:00 committed by GitHub
parent 399130bc95
commit e06d7050f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 26 additions and 26 deletions

View File

@ -12,7 +12,7 @@ from homeassistant.components.climate import (
ATTR_HVAC_MODE,
ATTR_PRESET_MODE,
ATTR_SWING_MODE,
PLATFORM_SCHEMA,
PLATFORM_SCHEMA as CLIMATE_PLATFORM_SCHEMA,
PRESET_AWAY,
PRESET_BOOST,
PRESET_ECO,
@ -45,7 +45,7 @@ from .const import (
_LOGGER = logging.getLogger(__name__)
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
PLATFORM_SCHEMA = CLIMATE_PLATFORM_SCHEMA.extend(
{vol.Required(CONF_HOST): cv.string, vol.Optional(CONF_NAME): cv.string}
)

View File

@ -20,7 +20,7 @@ from pyephember.pyephember import (
import voluptuous as vol
from homeassistant.components.climate import (
PLATFORM_SCHEMA,
PLATFORM_SCHEMA as CLIMATE_PLATFORM_SCHEMA,
ClimateEntity,
ClimateEntityFeature,
HVACAction,
@ -44,7 +44,7 @@ SCAN_INTERVAL = timedelta(seconds=120)
OPERATION_LIST = [HVACMode.HEAT_COOL, HVACMode.HEAT, HVACMode.OFF]
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
PLATFORM_SCHEMA = CLIMATE_PLATFORM_SCHEMA.extend(
{vol.Required(CONF_USERNAME): cv.string, vol.Required(CONF_PASSWORD): cv.string}
)

View File

@ -8,7 +8,7 @@ from typing import Any
import voluptuous as vol
from homeassistant.components.climate import (
PLATFORM_SCHEMA,
PLATFORM_SCHEMA as CLIMATE_PLATFORM_SCHEMA,
ClimateEntity,
ClimateEntityFeature,
HVACAction,
@ -36,7 +36,7 @@ from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
CALL_TYPE_WRITE_REGISTER = "write_register"
CONF_HUB = "hub"
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
PLATFORM_SCHEMA = CLIMATE_PLATFORM_SCHEMA.extend(
{
vol.Optional(CONF_HUB, default=DEFAULT_HUB): cv.string,
vol.Required(CONF_SLAVE): vol.All(int, vol.Range(min=0, max=32)),

View File

@ -13,7 +13,7 @@ import voluptuous as vol
from homeassistant.components.climate import (
ATTR_PRESET_MODE,
PLATFORM_SCHEMA,
PLATFORM_SCHEMA as CLIMATE_PLATFORM_SCHEMA,
PRESET_ACTIVITY,
PRESET_AWAY,
PRESET_COMFORT,
@ -125,7 +125,7 @@ PLATFORM_SCHEMA_COMMON = vol.Schema(
)
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(PLATFORM_SCHEMA_COMMON.schema)
PLATFORM_SCHEMA = CLIMATE_PLATFORM_SCHEMA.extend(PLATFORM_SCHEMA_COMMON.schema)
async def async_setup_entry(

View File

@ -9,7 +9,7 @@ from heatmiserV3 import connection, heatmiser
import voluptuous as vol
from homeassistant.components.climate import (
PLATFORM_SCHEMA,
PLATFORM_SCHEMA as CLIMATE_PLATFORM_SCHEMA,
ClimateEntity,
ClimateEntityFeature,
HVACMode,
@ -38,7 +38,7 @@ TSTATS_SCHEMA = vol.Schema(
)
)
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
PLATFORM_SCHEMA = CLIMATE_PLATFORM_SCHEMA.extend(
{
vol.Required(CONF_HOST): cv.string,
vol.Required(CONF_PORT): cv.string,

View File

@ -11,7 +11,7 @@ import voluptuous as vol
from homeassistant.components.climate import (
ATTR_HVAC_MODE,
PLATFORM_SCHEMA,
PLATFORM_SCHEMA as CLIMATE_PLATFORM_SCHEMA,
PRESET_BOOST,
PRESET_COMFORT,
PRESET_ECO,
@ -44,7 +44,7 @@ IH_DEVICE_INTESISHOME = "IntesisHome"
IH_DEVICE_AIRCONWITHME = "airconwithme"
IH_DEVICE_ANYWAIR = "anywair"
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
PLATFORM_SCHEMA = CLIMATE_PLATFORM_SCHEMA.extend(
{
vol.Required(CONF_USERNAME): cv.string,
vol.Required(CONF_PASSWORD): cv.string,

View File

@ -9,7 +9,7 @@ import requests
import voluptuous as vol
from homeassistant.components.climate import (
PLATFORM_SCHEMA,
PLATFORM_SCHEMA as CLIMATE_PLATFORM_SCHEMA,
ClimateEntity,
ClimateEntityFeature,
HVACAction,
@ -29,7 +29,7 @@ import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
PLATFORM_SCHEMA = CLIMATE_PLATFORM_SCHEMA.extend(
{
vol.Required(CONF_HOST): cv.string,
vol.Optional(CONF_NAME, default="Thermostat"): cv.string,

View File

@ -8,7 +8,7 @@ import proliphix
import voluptuous as vol
from homeassistant.components.climate import (
PLATFORM_SCHEMA,
PLATFORM_SCHEMA as CLIMATE_PLATFORM_SCHEMA,
ClimateEntity,
ClimateEntityFeature,
HVACAction,
@ -29,7 +29,7 @@ from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
ATTR_FAN = "fan"
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
PLATFORM_SCHEMA = CLIMATE_PLATFORM_SCHEMA.extend(
{
vol.Required(CONF_HOST): cv.string,
vol.Required(CONF_USERNAME): cv.string,

View File

@ -9,7 +9,7 @@ from requests import RequestException
import voluptuous as vol
from homeassistant.components.climate import (
PLATFORM_SCHEMA,
PLATFORM_SCHEMA as CLIMATE_PLATFORM_SCHEMA,
SCAN_INTERVAL,
ClimateEntity,
ClimateEntityFeature,
@ -29,7 +29,7 @@ from homeassistant.helpers.update_coordinator import (
from . import DATA_SCHLUTER_API, DATA_SCHLUTER_SESSION, DOMAIN
_LOGGER = logging.getLogger(__name__)
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
PLATFORM_SCHEMA = CLIMATE_PLATFORM_SCHEMA.extend(
{vol.Optional(CONF_SCAN_INTERVAL): vol.All(vol.Coerce(int), vol.Range(min=1))}
)

View File

@ -15,7 +15,7 @@ from homeassistant.components.climate import (
FAN_HIGH,
FAN_LOW,
FAN_MEDIUM,
PLATFORM_SCHEMA,
PLATFORM_SCHEMA as CLIMATE_PLATFORM_SCHEMA,
SWING_BOTH,
SWING_HORIZONTAL,
SWING_OFF,
@ -32,7 +32,7 @@ from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
SCAN_INTERVAL = timedelta(seconds=60)
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({vol.Required(CONF_HOST): cv.string})
PLATFORM_SCHEMA = CLIMATE_PLATFORM_SCHEMA.extend({vol.Required(CONF_HOST): cv.string})
_LOGGER = logging.getLogger(__name__)

View File

@ -8,7 +8,7 @@ from pytouchline import PyTouchline
import voluptuous as vol
from homeassistant.components.climate import (
PLATFORM_SCHEMA,
PLATFORM_SCHEMA as CLIMATE_PLATFORM_SCHEMA,
ClimateEntity,
ClimateEntityFeature,
HVACMode,
@ -41,7 +41,7 @@ TOUCHLINE_HA_PRESETS = {
for preset, settings in PRESET_MODES.items()
}
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({vol.Required(CONF_HOST): cv.string})
PLATFORM_SCHEMA = CLIMATE_PLATFORM_SCHEMA.extend({vol.Required(CONF_HOST): cv.string})
def setup_platform(

View File

@ -10,7 +10,7 @@ from homeassistant.components.climate import (
ATTR_TARGET_TEMP_LOW,
FAN_AUTO,
FAN_ON,
PLATFORM_SCHEMA,
PLATFORM_SCHEMA as CLIMATE_PLATFORM_SCHEMA,
PRESET_AWAY,
PRESET_NONE,
ClimateEntity,
@ -48,7 +48,7 @@ from .const import (
)
from .coordinator import VenstarDataUpdateCoordinator
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
PLATFORM_SCHEMA = CLIMATE_PLATFORM_SCHEMA.extend(
{
vol.Required(CONF_HOST): cv.string,
vol.Optional(CONF_PASSWORD): cv.string,

View File

@ -11,7 +11,7 @@ from zhong_hong_hvac.hvac import HVAC as ZhongHongHVAC
from homeassistant.components.climate import (
ATTR_HVAC_MODE,
PLATFORM_SCHEMA,
PLATFORM_SCHEMA as CLIMATE_PLATFORM_SCHEMA,
ClimateEntity,
ClimateEntityFeature,
HVACMode,
@ -42,7 +42,7 @@ DEFAULT_GATEWAY_ADDRRESS = 1
SIGNAL_DEVICE_ADDED = "zhong_hong_device_added"
SIGNAL_ZHONG_HONG_HUB_START = "zhong_hong_hub_start"
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
PLATFORM_SCHEMA = CLIMATE_PLATFORM_SCHEMA.extend(
{
vol.Required(CONF_HOST): cv.string,
vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.port,