change homematic to autodetect only

This commit is contained in:
Pascal Vizeli committed 2016-06-28 22:53:53 +02:00
1 parent 00179763ef
commit baa9bdf6fc
7 files changed
+49 -182

No files matched your search

+6 -16
View File
@@ -6,14 +6,6 @@ https://home-assistant.io/components/sensor.homematic/
Important: For this platform to work the homematic component has to be
properly configured.
Configuration:
sensor:
- platform: homematic
address: <Homematic address for device> # e.g. "JEQ0XXXXXXX"
name: <User defined name> (optional)
param: <Name of datapoint to us as sensor> (optional)
"""
import logging
@@ -41,14 +33,12 @@ HM_UNIT_HA_CAST = {
def setup_platform(hass, config, add_callback_devices, discovery_info=None):
"""Setup the platform."""
if discovery_info:
return homematic.setup_hmdevice_discovery_helper(HMSensor,
discovery_info,
add_callback_devices)
# Manual
return homematic.setup_hmdevice_entity_helper(HMSensor,
config,
add_callback_devices)
if discovery_info is None:
return
return homematic.setup_hmdevice_discovery_helper(HMSensor,
discovery_info,
add_callback_devices)
class HMSensor(homematic.HMDevice):