mirror of
https://github.com/home-assistant/core.git
synced 2025-08-08 15:15:09 +02:00
@@ -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)
|
||||||
|
Reference in New Issue
Block a user