Remove all empty *_setup_platform() from integrations (#31025)

* Remove all empty *_setup_platform() from integrations

* Fix tests for smartthings

* Fix tests for heos
This commit is contained in:
Franck Nijhof 2020-01-21 12:38:38 +01:00 committed by GitHub
parent 41014d73be
commit fb35d382e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
89 changed files with 0 additions and 451 deletions

View File

@ -21,11 +21,6 @@ _LOGGER = logging.getLogger(__name__)
ICON = "mdi:security" ICON = "mdi:security"
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Abode alarm control panel device.""" """Set up Abode alarm control panel device."""
data = hass.data[DOMAIN] data = hass.data[DOMAIN]

View File

@ -13,11 +13,6 @@ from .const import DOMAIN, SIGNAL_TRIGGER_QUICK_ACTION
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Abode binary sensor devices.""" """Set up Abode binary sensor devices."""
data = hass.data[DOMAIN] data = hass.data[DOMAIN]

View File

@ -18,11 +18,6 @@ MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=90)
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Abode camera devices.""" """Set up Abode camera devices."""
data = hass.data[DOMAIN] data = hass.data[DOMAIN]

View File

@ -11,11 +11,6 @@ from .const import DOMAIN
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Abode cover devices.""" """Set up Abode cover devices."""
data = hass.data[DOMAIN] data = hass.data[DOMAIN]

View File

@ -24,11 +24,6 @@ from .const import DOMAIN
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Abode light devices.""" """Set up Abode light devices."""
data = hass.data[DOMAIN] data = hass.data[DOMAIN]

View File

@ -11,11 +11,6 @@ from .const import DOMAIN
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Abode lock devices.""" """Set up Abode lock devices."""
data = hass.data[DOMAIN] data = hass.data[DOMAIN]

View File

@ -22,11 +22,6 @@ SENSOR_TYPES = {
} }
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Abode sensor devices.""" """Set up Abode sensor devices."""
data = hass.data[DOMAIN] data = hass.data[DOMAIN]

View File

@ -12,11 +12,6 @@ from .const import DOMAIN
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Abode switch devices.""" """Set up Abode switch devices."""
data = hass.data[DOMAIN] data = hass.data[DOMAIN]

View File

@ -30,11 +30,6 @@ from .const import (
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up Ambient PWS binary sensors based on the old way."""
pass
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up Ambient PWS binary sensors based on a config entry.""" """Set up Ambient PWS binary sensors based on a config entry."""
ambient = hass.data[DOMAIN][DATA_CLIENT][entry.entry_id] ambient = hass.data[DOMAIN][DATA_CLIENT][entry.entry_id]

View File

@ -20,11 +20,6 @@ from .const import (
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up Ambient PWS sensors based on existing config."""
pass
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up Ambient PWS sensors based on a config entry.""" """Set up Ambient PWS sensors based on a config entry."""
ambient = hass.data[DOMAIN][DATA_CLIENT][entry.entry_id] ambient = hass.data[DOMAIN][DATA_CLIENT][entry.entry_id]

View File

@ -7,11 +7,6 @@ from homeassistant.components.binary_sensor import (
from .const import _LOGGER, DOMAIN, ECOBEE_MODEL_TO_NAME, MANUFACTURER from .const import _LOGGER, DOMAIN, ECOBEE_MODEL_TO_NAME, MANUFACTURER
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old way of setting up ecobee binary sensors."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up ecobee binary (occupancy) sensors.""" """Set up ecobee binary (occupancy) sensors."""
data = hass.data[DOMAIN] data = hass.data[DOMAIN]

View File

@ -156,11 +156,6 @@ SUPPORT_FLAGS = (
) )
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old way of setting up ecobee thermostat."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the ecobee thermostat.""" """Set up the ecobee thermostat."""

View File

@ -16,11 +16,6 @@ SENSOR_TYPES = {
} }
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old way of setting up ecobee sensors."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up ecobee (temperature and humidity) sensors.""" """Set up ecobee (temperature and humidity) sensors."""
data = hass.data[DOMAIN] data = hass.data[DOMAIN]

View File

@ -23,11 +23,6 @@ from .const import (
) )
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old way of setting up the ecobee weather platform."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the ecobee weather platform.""" """Set up the ecobee weather platform."""
data = hass.data[DOMAIN] data = hass.data[DOMAIN]

View File

@ -11,11 +11,6 @@ from .const import DATA_UPDATED, DOMAIN, SENSOR_TYPES
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up the Glances sensors is done through async_setup_entry."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the Glances sensors.""" """Set up the Glances sensors."""

View File

@ -60,11 +60,6 @@ CONTROL_TO_SUPPORT = {
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
pass
async def async_setup_entry( async def async_setup_entry(
hass: HomeAssistantType, entry: ConfigEntry, async_add_entities hass: HomeAssistantType, entry: ConfigEntry, async_add_entities
): ):

View File

@ -78,11 +78,6 @@ class HomeAirQualitySensor(HomeKitEntity, AirQualityEntity):
return data return data
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Legacy set up platform."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Homekit air quality sensor.""" """Set up Homekit air quality sensor."""
hkid = config_entry.data["AccessoryPairingID"] hkid = config_entry.data["AccessoryPairingID"]

View File

@ -40,11 +40,6 @@ TARGET_STATE_MAP = {
} }
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Legacy set up platform."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Homekit alarm control panel.""" """Set up Homekit alarm control panel."""
hkid = config_entry.data["AccessoryPairingID"] hkid = config_entry.data["AccessoryPairingID"]

View File

@ -93,11 +93,6 @@ ENTITY_TYPES = {
} }
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Legacy set up platform."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Homekit lighting.""" """Set up Homekit lighting."""
hkid = config_entry.data["AccessoryPairingID"] hkid = config_entry.data["AccessoryPairingID"]

View File

@ -45,11 +45,6 @@ CURRENT_MODE_HOMEKIT_TO_HASS = {
} }
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Legacy set up platform."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Homekit climate.""" """Set up Homekit climate."""
hkid = config_entry.data["AccessoryPairingID"] hkid = config_entry.data["AccessoryPairingID"]

View File

@ -36,11 +36,6 @@ TARGET_GARAGE_STATE_MAP = {STATE_OPEN: 0, STATE_CLOSED: 1, STATE_STOPPED: 2}
CURRENT_WINDOW_STATE_MAP = {0: STATE_CLOSING, 1: STATE_OPENING, 2: STATE_STOPPED} CURRENT_WINDOW_STATE_MAP = {0: STATE_CLOSING, 1: STATE_OPENING, 2: STATE_STOPPED}
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Legacy set up platform."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Homekit covers.""" """Set up Homekit covers."""
hkid = config_entry.data["AccessoryPairingID"] hkid = config_entry.data["AccessoryPairingID"]

View File

@ -230,11 +230,6 @@ ENTITY_TYPES = {
} }
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Legacy set up platform."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Homekit fans.""" """Set up Homekit fans."""
hkid = config_entry.data["AccessoryPairingID"] hkid = config_entry.data["AccessoryPairingID"]

View File

@ -18,11 +18,6 @@ from . import KNOWN_DEVICES, HomeKitEntity
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Legacy set up platform."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Homekit lightbulb.""" """Set up Homekit lightbulb."""
hkid = config_entry.data["AccessoryPairingID"] hkid = config_entry.data["AccessoryPairingID"]

View File

@ -17,11 +17,6 @@ CURRENT_STATE_MAP = {0: STATE_UNLOCKED, 1: STATE_LOCKED, 2: STATE_JAMMED, 3: Non
TARGET_STATE_MAP = {STATE_UNLOCKED: 0, STATE_LOCKED: 1} TARGET_STATE_MAP = {STATE_UNLOCKED: 0, STATE_LOCKED: 1}
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Legacy set up platform."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Homekit lock.""" """Set up Homekit lock."""
hkid = config_entry.data["AccessoryPairingID"] hkid = config_entry.data["AccessoryPairingID"]

View File

@ -241,11 +241,6 @@ ENTITY_TYPES = {
} }
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Legacy set up platform."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Homekit sensors.""" """Set up Homekit sensors."""
hkid = config_entry.data["AccessoryPairingID"] hkid = config_entry.data["AccessoryPairingID"]

View File

@ -12,11 +12,6 @@ OUTLET_IN_USE = "outlet_in_use"
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Legacy set up platform."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Homekit lock.""" """Set up Homekit lock."""
hkid = config_entry.data["AccessoryPairingID"] hkid = config_entry.data["AccessoryPairingID"]

View File

@ -50,11 +50,6 @@ TREND_INCREASING = "Increasing"
TREND_SUBSIDING = "Subsiding" TREND_SUBSIDING = "Subsiding"
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up IQVIA sensors based on the old way."""
pass
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up IQVIA sensors based on a config entry.""" """Set up IQVIA sensors based on a config entry."""
iqvia = hass.data[DOMAIN][DATA_CLIENT][entry.entry_id] iqvia = hass.data[DOMAIN][DATA_CLIENT][entry.entry_id]

View File

@ -30,11 +30,6 @@ INDEX_LAST = -2
ATTRIBUTION = "Data provided by Enedis" ATTRIBUTION = "Data provided by Enedis"
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old way of setting up the Linky platform."""
pass
async def async_setup_entry( async def async_setup_entry(
hass: HomeAssistantType, entry: ConfigEntry, async_add_entities hass: HomeAssistantType, entry: ConfigEntry, async_add_entities
) -> None: ) -> None:

View File

@ -24,11 +24,6 @@ from .const import ATTR_SENSOR_ID
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up an Luftdaten sensor based on existing config."""
pass
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up a Luftdaten sensor based on a config entry.""" """Set up a Luftdaten sensor based on a config entry."""
luftdaten = hass.data[DOMAIN][DATA_LUFTDATEN_CLIENT][entry.entry_id] luftdaten = hass.data[DOMAIN][DATA_LUFTDATEN_CLIENT][entry.entry_id]

View File

@ -20,11 +20,6 @@ SCAN_INTERVAL = timedelta(minutes=SCAN_INTERVAL_MINUTES)
ATTR_GENERATED_AT = "generated_at" ATTR_GENERATED_AT = "generated_at"
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up the Neato Camera."""
pass
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up Neato camera with config entry.""" """Set up Neato camera with config entry."""
dev = [] dev = []

View File

@ -16,11 +16,6 @@ SCAN_INTERVAL = timedelta(minutes=SCAN_INTERVAL_MINUTES)
BATTERY = "Battery" BATTERY = "Battery"
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up the Neato sensor."""
pass
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up the Neato sensor using config entry.""" """Set up the Neato sensor using config entry."""
dev = [] dev = []

View File

@ -18,11 +18,6 @@ SWITCH_TYPE_SCHEDULE = "schedule"
SWITCH_TYPES = {SWITCH_TYPE_SCHEDULE: ["Schedule"]} SWITCH_TYPES = {SWITCH_TYPE_SCHEDULE: ["Schedule"]}
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up the Neato switches."""
pass
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up Neato switch with config entry.""" """Set up Neato switch with config entry."""
dev = [] dev = []

View File

@ -84,11 +84,6 @@ SERVICE_NEATO_CUSTOM_CLEANING_SCHEMA = vol.Schema(
) )
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up the Neato vacuum."""
pass
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up Neato vacuum with config entry.""" """Set up Neato vacuum with config entry."""
dev = [] dev = []

View File

@ -76,11 +76,6 @@ async def async_setup_entry(hass, entry, async_add_entities):
async_add_entities(await hass.async_add_executor_job(get_entities), True) async_add_entities(await hass.async_add_executor_job(get_entities), True)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up the access to Netatmo binary sensor."""
pass
class NetatmoBinarySensor(BinarySensorDevice): class NetatmoBinarySensor(BinarySensorDevice):
"""Represent a single binary sensor in a Netatmo Camera device.""" """Represent a single binary sensor in a Netatmo Camera device."""

View File

@ -23,11 +23,6 @@ ATTR_PROTECTION_WINDOW_STARTING_TIME = "start_time"
ATTR_PROTECTION_WINDOW_STARTING_UV = "start_uv" ATTR_PROTECTION_WINDOW_STARTING_UV = "start_uv"
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up an OpenUV sensor based on existing config."""
pass
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up an OpenUV sensor based on a config entry.""" """Set up an OpenUV sensor based on a config entry."""
openuv = hass.data[DOMAIN][DATA_OPENUV_CLIENT][entry.entry_id] openuv = hass.data[DOMAIN][DATA_OPENUV_CLIENT][entry.entry_id]

View File

@ -44,11 +44,6 @@ UV_LEVEL_MODERATE = "Moderate"
UV_LEVEL_LOW = "Low" UV_LEVEL_LOW = "Low"
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up an OpenUV sensor based on existing config."""
pass
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up a Nest sensor based on a config entry.""" """Set up a Nest sensor based on a config entry."""
openuv = hass.data[DOMAIN][DATA_OPENUV_CLIENT][entry.entry_id] openuv = hass.data[DOMAIN][DATA_OPENUV_CLIENT][entry.entry_id]

View File

@ -69,11 +69,6 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
async_add_entities(device_list, update_before_add=True) async_add_entities(device_list, update_before_add=True)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Not Implemented."""
pass
class PS4Device(MediaPlayerDevice): class PS4Device(MediaPlayerDevice):
"""Representation of a PS4.""" """Representation of a PS4."""

View File

@ -28,11 +28,6 @@ from . import (
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up RainMachine binary sensors based on the old way."""
pass
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up RainMachine binary sensors based on a config entry.""" """Set up RainMachine binary sensors based on a config entry."""
rainmachine = hass.data[RAINMACHINE_DOMAIN][DATA_CLIENT][entry.entry_id] rainmachine = hass.data[RAINMACHINE_DOMAIN][DATA_CLIENT][entry.entry_id]

View File

@ -22,11 +22,6 @@ from . import (
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up RainMachine sensors based on the old way."""
pass
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up RainMachine sensors based on a config entry.""" """Set up RainMachine sensors based on a config entry."""
rainmachine = hass.data[RAINMACHINE_DOMAIN][DATA_CLIENT][entry.entry_id] rainmachine = hass.data[RAINMACHINE_DOMAIN][DATA_CLIENT][entry.entry_id]

View File

@ -95,11 +95,6 @@ VEGETATION_MAP = {
} }
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up RainMachine switches sensor based on the old way."""
pass
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up RainMachine switches based on a config entry.""" """Set up RainMachine switches based on a config entry."""
rainmachine = hass.data[RAINMACHINE_DOMAIN][DATA_CLIENT][entry.entry_id] rainmachine = hass.data[RAINMACHINE_DOMAIN][DATA_CLIENT][entry.entry_id]

View File

@ -57,11 +57,6 @@ VOLUME_STRING_MAP = {
} }
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up a SimpliSafe alarm control panel based on existing config."""
pass
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up a SimpliSafe alarm control panel based on a config entry.""" """Set up a SimpliSafe alarm control panel based on a config entry."""
simplisafe = hass.data[DOMAIN][DATA_CLIENT][entry.entry_id] simplisafe = hass.data[DOMAIN][DATA_CLIENT][entry.entry_id]

View File

@ -32,11 +32,6 @@ ATTRIB_TO_CLASS = {
} }
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Add binary sensors for a config entry.""" """Add binary sensors for a config entry."""
broker = hass.data[DOMAIN][DATA_BROKERS][config_entry.entry_id] broker = hass.data[DOMAIN][DATA_BROKERS][config_entry.entry_id]

View File

@ -80,11 +80,6 @@ UNIT_MAP = {"C": TEMP_CELSIUS, "F": TEMP_FAHRENHEIT}
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Add climate entities for a config entry.""" """Add climate entities for a config entry."""
ac_capabilities = [ ac_capabilities = [

View File

@ -33,11 +33,6 @@ VALUE_TO_STATE = {
} }
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Add covers for a config entry.""" """Add covers for a config entry."""
broker = hass.data[DOMAIN][DATA_BROKERS][config_entry.entry_id] broker = hass.data[DOMAIN][DATA_BROKERS][config_entry.entry_id]

View File

@ -19,11 +19,6 @@ VALUE_TO_SPEED = {0: SPEED_OFF, 1: SPEED_LOW, 2: SPEED_MEDIUM, 3: SPEED_HIGH}
SPEED_TO_VALUE = {v: k for k, v in VALUE_TO_SPEED.items()} SPEED_TO_VALUE = {v: k for k, v in VALUE_TO_SPEED.items()}
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Add fans for a config entry.""" """Add fans for a config entry."""
broker = hass.data[DOMAIN][DATA_BROKERS][config_entry.entry_id] broker = hass.data[DOMAIN][DATA_BROKERS][config_entry.entry_id]

View File

@ -21,11 +21,6 @@ from . import SmartThingsEntity
from .const import DATA_BROKERS, DOMAIN from .const import DATA_BROKERS, DOMAIN
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Add lights for a config entry.""" """Add lights for a config entry."""
broker = hass.data[DOMAIN][DATA_BROKERS][config_entry.entry_id] broker = hass.data[DOMAIN][DATA_BROKERS][config_entry.entry_id]

View File

@ -19,11 +19,6 @@ ST_LOCK_ATTR_MAP = {
} }
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Add locks for a config entry.""" """Add locks for a config entry."""
broker = hass.data[DOMAIN][DATA_BROKERS][config_entry.entry_id] broker = hass.data[DOMAIN][DATA_BROKERS][config_entry.entry_id]

View File

@ -4,11 +4,6 @@ from homeassistant.components.scene import Scene
from .const import DATA_BROKERS, DOMAIN from .const import DATA_BROKERS, DOMAIN
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Add switches for a config entry.""" """Add switches for a config entry."""
broker = hass.data[DOMAIN][DATA_BROKERS][config_entry.entry_id] broker = hass.data[DOMAIN][DATA_BROKERS][config_entry.entry_id]

View File

@ -229,11 +229,6 @@ UNITS = {"C": TEMP_CELSIUS, "F": TEMP_FAHRENHEIT}
THREE_AXIS_NAMES = ["X Coordinate", "Y Coordinate", "Z Coordinate"] THREE_AXIS_NAMES = ["X Coordinate", "Y Coordinate", "Z Coordinate"]
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Add binary sensors for a config entry.""" """Add binary sensors for a config entry."""
broker = hass.data[DOMAIN][DATA_BROKERS][config_entry.entry_id] broker = hass.data[DOMAIN][DATA_BROKERS][config_entry.entry_id]

View File

@ -9,11 +9,6 @@ from . import SmartThingsEntity
from .const import DATA_BROKERS, DOMAIN from .const import DATA_BROKERS, DOMAIN
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Add switches for a config entry.""" """Add switches for a config entry."""
broker = hass.data[DOMAIN][DATA_BROKERS][config_entry.entry_id] broker = hass.data[DOMAIN][DATA_BROKERS][config_entry.entry_id]

View File

@ -21,11 +21,6 @@ from .const import (
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old configuration."""
pass
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Add an solarEdge entry.""" """Add an solarEdge entry."""
# Add the needed sensors to hass # Add the needed sensors to hass

View File

@ -8,11 +8,6 @@ from . import DOMAIN as TESLA_DOMAIN, TeslaDevice
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up the Tesla binary sensor."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the Tesla binary_sensors by config_entry.""" """Set up the Tesla binary_sensors by config_entry."""
async_add_entities( async_add_entities(

View File

@ -16,11 +16,6 @@ _LOGGER = logging.getLogger(__name__)
SUPPORT_HVAC = [HVAC_MODE_HEAT_COOL, HVAC_MODE_OFF] SUPPORT_HVAC = [HVAC_MODE_HEAT_COOL, HVAC_MODE_OFF]
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up the Tesla climate platform."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the Tesla binary_sensors by config_entry.""" """Set up the Tesla binary_sensors by config_entry."""
async_add_entities( async_add_entities(

View File

@ -9,11 +9,6 @@ from . import DOMAIN as TESLA_DOMAIN, TeslaDevice
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up the Tesla lock platform."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the Tesla binary_sensors by config_entry.""" """Set up the Tesla binary_sensors by config_entry."""
entities = [ entities = [

View File

@ -15,11 +15,6 @@ from . import DOMAIN as TESLA_DOMAIN, TeslaDevice
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up the Tesla sensor platform."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the Tesla binary_sensors by config_entry.""" """Set up the Tesla binary_sensors by config_entry."""
controller = hass.data[TESLA_DOMAIN][config_entry.entry_id]["controller"] controller = hass.data[TESLA_DOMAIN][config_entry.entry_id]["controller"]

View File

@ -9,11 +9,6 @@ from . import DOMAIN as TESLA_DOMAIN, TeslaDevice
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up the Tesla switch platform."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the Tesla binary_sensors by config_entry.""" """Set up the Tesla binary_sensors by config_entry."""
controller = hass.data[TESLA_DOMAIN][config_entry.entry_id]["controller"] controller = hass.data[TESLA_DOMAIN][config_entry.entry_id]["controller"]

View File

@ -11,11 +11,6 @@ from .const import DOMAIN, SENSOR_TYPES, STATE_ATTR_TORRENT_INFO
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Import config from configuration.yaml."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the Transmission sensors.""" """Set up the Transmission sensors."""

View File

@ -11,11 +11,6 @@ from .const import DOMAIN, SWITCH_TYPES
_LOGGING = logging.getLogger(__name__) _LOGGING = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Import config from configuration.yaml."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the Transmission switch.""" """Set up the Transmission switch."""

View File

@ -9,11 +9,6 @@ from .const import DOMAIN
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old way."""
pass
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up Velbus binary sensor based on config_entry.""" """Set up Velbus binary sensor based on config_entry."""
cntrl = hass.data[DOMAIN][entry.entry_id]["cntrl"] cntrl = hass.data[DOMAIN][entry.entry_id]["cntrl"]

View File

@ -16,11 +16,6 @@ from .const import DOMAIN
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up Velbus binary sensors."""
pass
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up Velbus binary sensor based on config_entry.""" """Set up Velbus binary sensor based on config_entry."""
cntrl = hass.data[DOMAIN][entry.entry_id]["cntrl"] cntrl = hass.data[DOMAIN][entry.entry_id]["cntrl"]

View File

@ -16,11 +16,6 @@ from .const import DOMAIN
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up Velbus covers."""
pass
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up Velbus cover based on config_entry.""" """Set up Velbus cover based on config_entry."""
cntrl = hass.data[DOMAIN][entry.entry_id]["cntrl"] cntrl = hass.data[DOMAIN][entry.entry_id]["cntrl"]

View File

@ -21,11 +21,6 @@ from .const import DOMAIN
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old way."""
pass
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up Velbus light based on config_entry.""" """Set up Velbus light based on config_entry."""
cntrl = hass.data[DOMAIN][entry.entry_id]["cntrl"] cntrl = hass.data[DOMAIN][entry.entry_id]["cntrl"]

View File

@ -7,11 +7,6 @@ from .const import DOMAIN
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old way."""
pass
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up Velbus sensor based on config_entry.""" """Set up Velbus sensor based on config_entry."""
cntrl = hass.data[DOMAIN][entry.entry_id]["cntrl"] cntrl = hass.data[DOMAIN][entry.entry_id]["cntrl"]

View File

@ -11,11 +11,6 @@ from .const import DOMAIN
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old way."""
pass
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):
"""Set up Velbus switch based on config_entry.""" """Set up Velbus switch based on config_entry."""
cntrl = hass.data[DOMAIN][entry.entry_id]["cntrl"] cntrl = hass.data[DOMAIN][entry.entry_id]["cntrl"]

View File

@ -46,11 +46,6 @@ CLASS_MAPPING = {
STRICT_MATCH = functools.partial(ZHA_ENTITIES.strict_match, DOMAIN) STRICT_MATCH = functools.partial(ZHA_ENTITIES.strict_match, DOMAIN)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old way of setting up Zigbee Home Automation binary sensors."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the Zigbee Home Automation binary sensor from config entry.""" """Set up the Zigbee Home Automation binary sensor from config entry."""

View File

@ -26,11 +26,6 @@ SCAN_INTERVAL = timedelta(minutes=60)
STRICT_MATCH = functools.partial(ZHA_ENTITIES.strict_match, DOMAIN) STRICT_MATCH = functools.partial(ZHA_ENTITIES.strict_match, DOMAIN)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old way of setting up Zigbee Home Automation covers."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the Zigbee Home Automation cover from config entry.""" """Set up the Zigbee Home Automation cover from config entry."""

View File

@ -50,11 +50,6 @@ SPEED_TO_VALUE = {speed: i for i, speed in enumerate(SPEED_LIST)}
STRICT_MATCH = functools.partial(ZHA_ENTITIES.strict_match, DOMAIN) STRICT_MATCH = functools.partial(ZHA_ENTITIES.strict_match, DOMAIN)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old way of setting up Zigbee Home Automation fans."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the Zigbee Home Automation fan from config entry.""" """Set up the Zigbee Home Automation fan from config entry."""

View File

@ -42,11 +42,6 @@ STRICT_MATCH = functools.partial(ZHA_ENTITIES.strict_match, light.DOMAIN)
PARALLEL_UPDATES = 5 PARALLEL_UPDATES = 5
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old way of setting up Zigbee Home Automation lights."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the Zigbee Home Automation light from config entry.""" """Set up the Zigbee Home Automation light from config entry."""

View File

@ -33,11 +33,6 @@ STRICT_MATCH = functools.partial(ZHA_ENTITIES.strict_match, DOMAIN)
VALUE_TO_STATE = dict(enumerate(STATE_LIST)) VALUE_TO_STATE = dict(enumerate(STATE_LIST))
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old way of setting up Zigbee Home Automation locks."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the Zigbee Home Automation Door Lock from config entry.""" """Set up the Zigbee Home Automation Door Lock from config entry."""

View File

@ -63,11 +63,6 @@ CHANNEL_ST_HUMIDITY_CLUSTER = f"channel_0x{SMARTTHINGS_HUMIDITY_CLUSTER:04x}"
STRICT_MATCH = functools.partial(ZHA_ENTITIES.strict_match, DOMAIN) STRICT_MATCH = functools.partial(ZHA_ENTITIES.strict_match, DOMAIN)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old way of setting up Zigbee Home Automation sensors."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the Zigbee Home Automation sensor from config entry.""" """Set up the Zigbee Home Automation sensor from config entry."""

View File

@ -23,11 +23,6 @@ _LOGGER = logging.getLogger(__name__)
STRICT_MATCH = functools.partial(ZHA_ENTITIES.strict_match, DOMAIN) STRICT_MATCH = functools.partial(ZHA_ENTITIES.strict_match, DOMAIN)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old way of setting up Zigbee Home Automation switches."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the Zigbee Home Automation switch from config entry.""" """Set up the Zigbee Home Automation switch from config entry."""

View File

@ -14,11 +14,6 @@ from .const import COMMAND_CLASS_SENSOR_BINARY
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old method of setting up Z-Wave binary sensors."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Z-Wave binary sensors from Config Entry.""" """Set up Z-Wave binary sensors from Config Entry."""

View File

@ -128,11 +128,6 @@ DEFAULT_HVAC_MODES = [
] ]
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old method of setting up Z-Wave climate devices."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Z-Wave Climate device from Config Entry.""" """Set up Z-Wave Climate device from Config Entry."""

View File

@ -29,11 +29,6 @@ _LOGGER = logging.getLogger(__name__)
SUPPORT_GARAGE = SUPPORT_OPEN | SUPPORT_CLOSE SUPPORT_GARAGE = SUPPORT_OPEN | SUPPORT_CLOSE
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old method of setting up Z-Wave covers."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Z-Wave Cover from Config Entry.""" """Set up Z-Wave Cover from Config Entry."""

View File

@ -28,11 +28,6 @@ VALUE_TO_SPEED = {0: SPEED_OFF, 1: SPEED_LOW, 2: SPEED_MEDIUM, 3: SPEED_HIGH}
SPEED_TO_VALUE = {SPEED_OFF: 0, SPEED_LOW: 1, SPEED_MEDIUM: 50, SPEED_HIGH: 99} SPEED_TO_VALUE = {SPEED_OFF: 0, SPEED_LOW: 1, SPEED_MEDIUM: 50, SPEED_HIGH: 99}
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old method of setting up Z-Wave fans."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Z-Wave Fan from Config Entry.""" """Set up Z-Wave Fan from Config Entry."""

View File

@ -61,11 +61,6 @@ TEMP_WARM_HASS = (TEMP_COLOR_MAX - TEMP_COLOR_MIN) / 3 * 2 + TEMP_COLOR_MIN
TEMP_COLD_HASS = (TEMP_COLOR_MAX - TEMP_COLOR_MIN) / 3 + TEMP_COLOR_MIN TEMP_COLD_HASS = (TEMP_COLOR_MAX - TEMP_COLOR_MIN) / 3 + TEMP_COLOR_MIN
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old method of setting up Z-Wave lights."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Z-Wave Light from Config Entry.""" """Set up Z-Wave Light from Config Entry."""

View File

@ -153,11 +153,6 @@ CLEAR_USERCODE_SCHEMA = vol.Schema(
) )
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old method of setting up Z-Wave locks."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Z-Wave Lock from Config Entry.""" """Set up Z-Wave Lock from Config Entry."""

View File

@ -11,11 +11,6 @@ from . import ZWaveDeviceEntity, const
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old method of setting up Z-Wave sensors."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Z-Wave Sensor from Config Entry.""" """Set up Z-Wave Sensor from Config Entry."""

View File

@ -11,11 +11,6 @@ from . import ZWaveDeviceEntity, workaround
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old method of setting up Z-Wave switches."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Z-Wave Switch from Config Entry.""" """Set up Z-Wave Switch from Config Entry."""

View File

@ -63,11 +63,6 @@ async def setup_platform(hass, config_entry, config):
await hass.async_block_till_done() await hass.async_block_till_done()
async def test_async_setup_platform():
"""Test setup platform does nothing (it uses config entries)."""
await media_player.async_setup_platform(None, None, None)
async def test_state_attributes(hass, config_entry, config, controller): async def test_state_attributes(hass, config_entry, config, controller):
"""Tests the state attributes.""" """Tests the state attributes."""
await setup_platform(hass, config_entry, config) await setup_platform(hass, config_entry, config)

View File

@ -32,11 +32,6 @@ async def test_mapping_integrity():
assert device_class in DEVICE_CLASSES, device_class assert device_class in DEVICE_CLASSES, device_class
async def test_async_setup_platform():
"""Test setup platform does nothing (it uses config entries)."""
await binary_sensor.async_setup_platform(None, None, None)
async def test_entity_state(hass, device_factory): async def test_entity_state(hass, device_factory):
"""Tests the state attributes properly match the light types.""" """Tests the state attributes properly match the light types."""
device = device_factory( device = device_factory(

View File

@ -198,11 +198,6 @@ def air_conditioner_fixture(device_factory):
return device return device
async def test_async_setup_platform():
"""Test setup platform does nothing (it uses config entries)."""
await climate.async_setup_platform(None, None, None)
async def test_legacy_thermostat_entity_state(hass, legacy_thermostat): async def test_legacy_thermostat_entity_state(hass, legacy_thermostat):
"""Tests the state attributes properly match the thermostat type.""" """Tests the state attributes properly match the thermostat type."""
await setup_platform(hass, CLIMATE_DOMAIN, devices=[legacy_thermostat]) await setup_platform(hass, CLIMATE_DOMAIN, devices=[legacy_thermostat])

View File

@ -18,7 +18,6 @@ from homeassistant.components.cover import (
STATE_OPEN, STATE_OPEN,
STATE_OPENING, STATE_OPENING,
) )
from homeassistant.components.smartthings import cover
from homeassistant.components.smartthings.const import DOMAIN, SIGNAL_SMARTTHINGS_UPDATE from homeassistant.components.smartthings.const import DOMAIN, SIGNAL_SMARTTHINGS_UPDATE
from homeassistant.const import ATTR_BATTERY_LEVEL, ATTR_ENTITY_ID from homeassistant.const import ATTR_BATTERY_LEVEL, ATTR_ENTITY_ID
from homeassistant.helpers.dispatcher import async_dispatcher_send from homeassistant.helpers.dispatcher import async_dispatcher_send
@ -26,11 +25,6 @@ from homeassistant.helpers.dispatcher import async_dispatcher_send
from .conftest import setup_platform from .conftest import setup_platform
async def test_async_setup_platform():
"""Test setup platform does nothing (it uses config entries)."""
await cover.async_setup_platform(None, None, None)
async def test_entity_and_device_attributes(hass, device_factory): async def test_entity_and_device_attributes(hass, device_factory):
"""Test the attributes of the entity are correct.""" """Test the attributes of the entity are correct."""
# Arrange # Arrange

View File

@ -16,7 +16,6 @@ from homeassistant.components.fan import (
SPEED_OFF, SPEED_OFF,
SUPPORT_SET_SPEED, SUPPORT_SET_SPEED,
) )
from homeassistant.components.smartthings import fan
from homeassistant.components.smartthings.const import DOMAIN, SIGNAL_SMARTTHINGS_UPDATE from homeassistant.components.smartthings.const import DOMAIN, SIGNAL_SMARTTHINGS_UPDATE
from homeassistant.const import ATTR_ENTITY_ID, ATTR_SUPPORTED_FEATURES from homeassistant.const import ATTR_ENTITY_ID, ATTR_SUPPORTED_FEATURES
from homeassistant.helpers.dispatcher import async_dispatcher_send from homeassistant.helpers.dispatcher import async_dispatcher_send
@ -24,11 +23,6 @@ from homeassistant.helpers.dispatcher import async_dispatcher_send
from .conftest import setup_platform from .conftest import setup_platform
async def test_async_setup_platform():
"""Test setup platform does nothing (it uses config entries)."""
await fan.async_setup_platform(None, None, None)
async def test_entity_state(hass, device_factory): async def test_entity_state(hass, device_factory):
"""Tests the state attributes properly match the fan types.""" """Tests the state attributes properly match the fan types."""
device = device_factory( device = device_factory(

View File

@ -18,7 +18,6 @@ from homeassistant.components.light import (
SUPPORT_COLOR_TEMP, SUPPORT_COLOR_TEMP,
SUPPORT_TRANSITION, SUPPORT_TRANSITION,
) )
from homeassistant.components.smartthings import light
from homeassistant.components.smartthings.const import DOMAIN, SIGNAL_SMARTTHINGS_UPDATE from homeassistant.components.smartthings.const import DOMAIN, SIGNAL_SMARTTHINGS_UPDATE
from homeassistant.const import ATTR_ENTITY_ID, ATTR_SUPPORTED_FEATURES from homeassistant.const import ATTR_ENTITY_ID, ATTR_SUPPORTED_FEATURES
from homeassistant.helpers.dispatcher import async_dispatcher_send from homeassistant.helpers.dispatcher import async_dispatcher_send
@ -68,11 +67,6 @@ def light_devices_fixture(device_factory):
] ]
async def test_async_setup_platform():
"""Test setup platform does nothing (it uses config entries)."""
await light.async_setup_platform(None, None, None)
async def test_entity_state(hass, light_devices): async def test_entity_state(hass, light_devices):
"""Tests the state attributes properly match the light types.""" """Tests the state attributes properly match the light types."""
await setup_platform(hass, LIGHT_DOMAIN, devices=light_devices) await setup_platform(hass, LIGHT_DOMAIN, devices=light_devices)

View File

@ -8,18 +8,12 @@ from pysmartthings import Attribute, Capability
from pysmartthings.device import Status from pysmartthings.device import Status
from homeassistant.components.lock import DOMAIN as LOCK_DOMAIN from homeassistant.components.lock import DOMAIN as LOCK_DOMAIN
from homeassistant.components.smartthings import lock
from homeassistant.components.smartthings.const import DOMAIN, SIGNAL_SMARTTHINGS_UPDATE from homeassistant.components.smartthings.const import DOMAIN, SIGNAL_SMARTTHINGS_UPDATE
from homeassistant.helpers.dispatcher import async_dispatcher_send from homeassistant.helpers.dispatcher import async_dispatcher_send
from .conftest import setup_platform from .conftest import setup_platform
async def test_async_setup_platform():
"""Test setup platform does nothing (it uses config entries)."""
await lock.async_setup_platform(None, None, None)
async def test_entity_and_device_attributes(hass, device_factory): async def test_entity_and_device_attributes(hass, device_factory):
"""Test the attributes of the entity are correct.""" """Test the attributes of the entity are correct."""
# Arrange # Arrange

View File

@ -5,17 +5,11 @@ The only mocking required is of the underlying SmartThings API object so
real HTTP calls are not initiated during testing. real HTTP calls are not initiated during testing.
""" """
from homeassistant.components.scene import DOMAIN as SCENE_DOMAIN from homeassistant.components.scene import DOMAIN as SCENE_DOMAIN
from homeassistant.components.smartthings import scene as scene_platform
from homeassistant.const import ATTR_ENTITY_ID, SERVICE_TURN_ON from homeassistant.const import ATTR_ENTITY_ID, SERVICE_TURN_ON
from .conftest import setup_platform from .conftest import setup_platform
async def test_async_setup_platform():
"""Test setup platform does nothing (it uses config entries)."""
await scene_platform.async_setup_platform(None, None, None)
async def test_entity_and_device_attributes(hass, scene): async def test_entity_and_device_attributes(hass, scene):
"""Test the attributes of the entity are correct.""" """Test the attributes of the entity are correct."""
# Arrange # Arrange

View File

@ -31,11 +31,6 @@ async def test_mapping_integrity():
), sensor_map.device_class ), sensor_map.device_class
async def test_async_setup_platform():
"""Test setup platform does nothing (it uses config entries)."""
await sensor.async_setup_platform(None, None, None)
async def test_entity_state(hass, device_factory): async def test_entity_state(hass, device_factory):
"""Tests the state attributes properly match the sensor types.""" """Tests the state attributes properly match the sensor types."""
device = device_factory("Sensor 1", [Capability.battery], {Attribute.battery: 100}) device = device_factory("Sensor 1", [Capability.battery], {Attribute.battery: 100})

View File

@ -6,7 +6,6 @@ real HTTP calls are not initiated during testing.
""" """
from pysmartthings import Attribute, Capability from pysmartthings import Attribute, Capability
from homeassistant.components.smartthings import switch
from homeassistant.components.smartthings.const import DOMAIN, SIGNAL_SMARTTHINGS_UPDATE from homeassistant.components.smartthings.const import DOMAIN, SIGNAL_SMARTTHINGS_UPDATE
from homeassistant.components.switch import ( from homeassistant.components.switch import (
ATTR_CURRENT_POWER_W, ATTR_CURRENT_POWER_W,
@ -18,11 +17,6 @@ from homeassistant.helpers.dispatcher import async_dispatcher_send
from .conftest import setup_platform from .conftest import setup_platform
async def test_async_setup_platform():
"""Test setup platform does nothing (it uses config entries)."""
await switch.async_setup_platform(None, None, None)
async def test_entity_and_device_attributes(hass, device_factory): async def test_entity_and_device_attributes(hass, device_factory):
"""Test the attributes of the entity are correct.""" """Test the attributes of the entity are correct."""
# Arrange # Arrange