Skip to content

Commit

Permalink
Deprecate Daikin YAML platform setup (home-assistant#125158)
Browse files Browse the repository at this point in the history
  • Loading branch information
joostlek authored Sep 10, 2024
1 parent db61f8a commit d8bb8f1
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 55 deletions.
28 changes: 1 addition & 27 deletions homeassistant/components/daikin/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@
import logging
from typing import Any

import voluptuous as vol

from homeassistant.components.climate import (
ATTR_FAN_MODE,
ATTR_HVAC_MODE,
ATTR_PRESET_MODE,
ATTR_SWING_MODE,
PLATFORM_SCHEMA as CLIMATE_PLATFORM_SCHEMA,
PRESET_AWAY,
PRESET_BOOST,
PRESET_ECO,
Expand All @@ -23,16 +20,9 @@
HVACMode,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
ATTR_TEMPERATURE,
CONF_HOST,
CONF_NAME,
UnitOfTemperature,
)
from homeassistant.const import ATTR_TEMPERATURE, UnitOfTemperature
from homeassistant.core import HomeAssistant
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType

from . import DOMAIN as DAIKIN_DOMAIN
from .const import (
Expand All @@ -47,9 +37,6 @@

_LOGGER = logging.getLogger(__name__)

PLATFORM_SCHEMA = CLIMATE_PLATFORM_SCHEMA.extend(
{vol.Required(CONF_HOST): cv.string, vol.Optional(CONF_NAME): cv.string}
)

HA_STATE_TO_DAIKIN = {
HVACMode.FAN_ONLY: "fan",
Expand Down Expand Up @@ -95,19 +82,6 @@
DAIKIN_ATTR_ADVANCED = "adv"


async def async_setup_platform(
hass: HomeAssistant,
config: ConfigType,
async_add_entities: AddEntitiesCallback,
discovery_info: DiscoveryInfoType | None = None,
) -> None:
"""Old way of setting up the Daikin HVAC platform.
Can only be called when a user accidentally mentions the platform in their
config. But even in that case it would have been ignored.
"""


async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
) -> None:
Expand Down
14 changes: 0 additions & 14 deletions homeassistant/components/daikin/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType

from . import DOMAIN as DAIKIN_DOMAIN
from .const import (
Expand Down Expand Up @@ -134,19 +133,6 @@ class DaikinSensorEntityDescription(SensorEntityDescription):
)


async def async_setup_platform(
hass: HomeAssistant,
config: ConfigType,
async_add_entities: AddEntitiesCallback,
discovery_info: DiscoveryInfoType | None = None,
) -> None:
"""Old way of setting up the Daikin sensors.
Can only be called when a user accidentally mentions the platform in their
config. But even in that case it would have been ignored.
"""


async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
) -> None:
Expand Down
14 changes: 0 additions & 14 deletions homeassistant/components/daikin/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType

from . import DOMAIN
from .coordinator import DaikinCoordinator
Expand All @@ -19,19 +18,6 @@
DAIKIN_ATTR_MODE = "mode"


async def async_setup_platform(
hass: HomeAssistant,
config: ConfigType,
async_add_entities: AddEntitiesCallback,
discovery_info: DiscoveryInfoType | None = None,
) -> None:
"""Old way of setting up the platform.
Can only be called when a user accidentally mentions the platform in their
config. But even in that case it would have been ignored.
"""


async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
) -> None:
Expand Down

0 comments on commit d8bb8f1

Please sign in to comment.