Skip to content

Commit

Permalink
Debug adding devices to hass
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Harris committed Feb 21, 2018
1 parent 55fb724 commit ec30677
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions homeassistant/components/switch/insteon_plm.py
Expand Up @@ -37,6 +37,8 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
elif state_name == 'openClosedRelay':
new_entity = InsteonPLMOpenClosedDevice(device, state_key)

_LOGGER.debug('Created Switch device with address %s', new_entity.address)

if new_entity is not None:
async_add_devices([new_entity])

Expand Down Expand Up @@ -80,11 +82,11 @@ def is_on(self):
onlevel = self._insteon_device_state.value
return bool(onlevel)

@property
def device_state_attributes(self):
"""Provide attributes for display on device card."""
insteon_plm = get_component('insteon_plm')
return insteon_plm.common_attributes(self)
#@property
#def device_state_attributes(self):
# """Provide attributes for display on device card."""
# insteon_plm = get_component('insteon_plm')
# return insteon_plm.common_attributes(self)

@callback
def async_switch_update(self, deviceid, statename, val):
Expand Down Expand Up @@ -129,6 +131,10 @@ def address(self):
"""Return the address of the node."""
return self._insteon_device.address.human

def group(self):
"""Return the INSTEON group that the entity responds to."""
return self._insteon_device_state.group

@property
def name(self):
"""Return the name of the node (used for Entity_ID)."""
Expand All @@ -146,12 +152,12 @@ def is_on(self):
onlevel = self._insteon_device_state.value
return bool(onlevel)

@property
def device_state_attributes(self):
"""Provide attributes for display on device card."""
insteon_plm = get_component('insteon_plm')
return insteon_plm.common_attributes(self._insteon_device,
self._insteon_device_state)
#@property
#def device_state_attributes(self):
# """Provide attributes for display on device card."""
# insteon_plm = get_component('insteon_plm')
# return insteon_plm.common_attributes(self._insteon_device,
# self._insteon_device_state)

@callback
def async_relay_update(self, deviceid, statename, val):
Expand Down

0 comments on commit ec30677

Please sign in to comment.