Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
emlove committed Mar 23, 2017
1 parent 2f24fdb commit e06cce0
Showing 1 changed file with 12 additions and 21 deletions.
33 changes: 12 additions & 21 deletions homeassistant/components/zwave/workaround.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,28 +68,19 @@

def get_device_component_mapping(value):
"""Get mapping of value to another component."""
if (value.node.manufacturer_id.strip() and
value.node.product_type.strip()):
manufacturer_id = int(value.node.manufacturer_id, 16)
product_type = int(value.node.product_type, 16)
return DEVICE_COMPONENT_MAPPING.get(
(manufacturer_id, product_type, value.command_class))

return None
manufacturer_id = int(value.node.manufacturer_id, 16)
product_type = int(value.node.product_type, 16)
return DEVICE_COMPONENT_MAPPING.get(
(manufacturer_id, product_type, value.command_class))


def get_device_mapping(value):
"""Get mapping of value to a workaround."""
if (value.node.manufacturer_id.strip() and
value.node.product_id.strip() and
value.node.product_type.strip()):
manufacturer_id = int(value.node.manufacturer_id, 16)
product_type = int(value.node.product_type, 16)
product_id = int(value.node.product_id, 16)
result = DEVICE_MAPPINGS_MTII.get(
(manufacturer_id, product_type, product_id, value.index))
if result:
return result
return DEVICE_MAPPINGS_MT.get((manufacturer_id, product_type))

return None
manufacturer_id = int(value.node.manufacturer_id, 16)
product_type = int(value.node.product_type, 16)
product_id = int(value.node.product_id, 16)
result = DEVICE_MAPPINGS_MTII.get(
(manufacturer_id, product_type, product_id, value.index))
if result:
return result
return DEVICE_MAPPINGS_MT.get((manufacturer_id, product_type))

0 comments on commit e06cce0

Please sign in to comment.