mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Revert "fix autodiscovery"
This reverts commit 86ccf26a1a41a73ecb5d4514d66f4aacce4bf349.
This commit is contained in:
parent
57754cd2ff
commit
199fbc7a15
@ -55,8 +55,6 @@ SUPPORT_HM_EVENT_AS_BINMOD = [
|
||||
|
||||
def setup_platform(hass, config, add_callback_devices, discovery_info=None):
|
||||
"""Setup the platform."""
|
||||
if discovery_info:
|
||||
config = discovery_info
|
||||
return homematic.setup_hmdevice_entity_helper(HMBinarySensor,
|
||||
config,
|
||||
add_callback_devices)
|
||||
|
@ -21,6 +21,7 @@ from homeassistant.const import EVENT_HOMEASSISTANT_STOP, \
|
||||
ATTR_SERVICE, \
|
||||
ATTR_DISCOVERED, \
|
||||
STATE_UNKNOWN
|
||||
from homeassistant.loader import get_component
|
||||
from homeassistant.helpers import discovery
|
||||
from homeassistant.helpers.entity import Entity
|
||||
import homeassistant.bootstrap
|
||||
@ -149,8 +150,10 @@ def system_callback_handler(hass, config, src, *args):
|
||||
# When devices of this type are found
|
||||
# they are setup in HA and an event is fired
|
||||
if found_devices:
|
||||
component = get_component(component_name)
|
||||
|
||||
# HA discovery event
|
||||
discovery.load_platform(hass, component_name, DOMAIN, {
|
||||
discovery.load_platform(hass, component, DOMAIN, {
|
||||
ATTR_DISCOVER_DEVICES: found_devices
|
||||
}, config)
|
||||
|
||||
|
@ -29,8 +29,6 @@ DEPENDENCIES = ['homematic']
|
||||
|
||||
def setup_platform(hass, config, add_callback_devices, discovery_info=None):
|
||||
"""Setup the platform."""
|
||||
if discovery_info:
|
||||
config = discovery_info
|
||||
return homematic.setup_hmdevice_entity_helper(HMLight,
|
||||
config,
|
||||
add_callback_devices)
|
||||
|
@ -29,8 +29,6 @@ DEPENDENCIES = ['homematic']
|
||||
|
||||
def setup_platform(hass, config, add_callback_devices, discovery_info=None):
|
||||
"""Setup the platform."""
|
||||
if discovery_info:
|
||||
config = discovery_info
|
||||
return homematic.setup_hmdevice_entity_helper(HMRollershutter,
|
||||
config,
|
||||
add_callback_devices)
|
||||
|
@ -41,8 +41,6 @@ HM_UNIT_HA_CAST = {
|
||||
|
||||
def setup_platform(hass, config, add_callback_devices, discovery_info=None):
|
||||
"""Setup the platform."""
|
||||
if discovery_info:
|
||||
config = discovery_info
|
||||
return homematic.setup_hmdevice_entity_helper(HMSensor,
|
||||
config,
|
||||
add_callback_devices)
|
||||
|
@ -28,8 +28,6 @@ DEPENDENCIES = ['homematic']
|
||||
|
||||
def setup_platform(hass, config, add_callback_devices, discovery_info=None):
|
||||
"""Setup the platform."""
|
||||
if discovery_info:
|
||||
config = discovery_info
|
||||
return homematic.setup_hmdevice_entity_helper(HMSwitch,
|
||||
config,
|
||||
add_callback_devices)
|
||||
|
@ -28,8 +28,6 @@ _LOGGER = logging.getLogger(__name__)
|
||||
|
||||
def setup_platform(hass, config, add_callback_devices, discovery_info=None):
|
||||
"""Setup the platform."""
|
||||
if discovery_info:
|
||||
config = discovery_info
|
||||
return homematic.setup_hmdevice_entity_helper(HMThermostat,
|
||||
config,
|
||||
add_callback_devices)
|
||||
|
Loading…
x
Reference in New Issue
Block a user