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