Add debugging message to confirm platform setup

This commit is contained in:
Tom Harris
2018-02-21 00:44:02 -05:00
parent 6d11c42696
commit 65656ccc83
5 changed files with 15 additions and 0 deletions

View File

@@ -31,6 +31,9 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
device = plm.devices[address]
state_key = discovery_info['state_key']
_LOGGER.debug('Adding device %s with state name %s to Binary Sensor platform.',
device.address.hex, device.states[state_key].name)
entities.append(InsteonPLMBinarySensor(device, state_key))
async_add_devices(entities)

View File

@@ -39,6 +39,9 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
device = plm.devices[address]
state_key = discovery_info['state_key']
_LOGGER.debug('Adding device %s with state name %s to Fan platform.',
device.address.hex, device.states[state_key].name)
entities.append(InsteonPLMFan(device, state_key, SUPPORT_SET_SPEED))
async_add_devices(entities)

View File

@@ -29,6 +29,9 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
device = plm.devices[address]
state_key = discovery_info['state_key']
_LOGGER.debug('Adding device %s with state name %s to Light platform.',
device.address.hex, device.states[state_key].name)
entities.append(InsteonPLMDimmerDevice(device, state_key))
async_add_devices(entities)

View File

@@ -26,6 +26,9 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
device = plm.devices[address]
state_key = discovery_info['state_key']
_LOGGER.debug('Adding device %s with state name %s to Sensor platform.',
device.address.hex, device.states[state_key].name)
entities.append(InsteonPLMSensorDevice(device, state_key))
async_add_devices(entities)

View File

@@ -28,6 +28,9 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
state_name = device.states[state_key].name
_LOGGER.debug('Adding device %s with state name %s to Switch platform.',
device.address.hex, device.states[state_key].name)
if state_name in ['lightOnOff', 'outletTopOnOff', 'outletBottomOnOff']:
entities.append(InsteonPLMSwitchDevice(device, state_key))
elif state_name == 'openClosedRelay':