Remove unused code

This commit is contained in:
Adam Mills
2017-03-23 16:24:56 -04:00
parent 2f24fdb5d8
commit e06cce0abe

View File

@@ -68,28 +68,19 @@ DEVICE_COMPONENT_MAPPING = {
def get_device_component_mapping(value): def get_device_component_mapping(value):
"""Get mapping of value to another component.""" """Get mapping of value to another component."""
if (value.node.manufacturer_id.strip() and manufacturer_id = int(value.node.manufacturer_id, 16)
value.node.product_type.strip()): product_type = int(value.node.product_type, 16)
manufacturer_id = int(value.node.manufacturer_id, 16) return DEVICE_COMPONENT_MAPPING.get(
product_type = int(value.node.product_type, 16) (manufacturer_id, product_type, value.command_class))
return DEVICE_COMPONENT_MAPPING.get(
(manufacturer_id, product_type, value.command_class))
return None
def get_device_mapping(value): def get_device_mapping(value):
"""Get mapping of value to a workaround.""" """Get mapping of value to a workaround."""
if (value.node.manufacturer_id.strip() and manufacturer_id = int(value.node.manufacturer_id, 16)
value.node.product_id.strip() and product_type = int(value.node.product_type, 16)
value.node.product_type.strip()): product_id = int(value.node.product_id, 16)
manufacturer_id = int(value.node.manufacturer_id, 16) result = DEVICE_MAPPINGS_MTII.get(
product_type = int(value.node.product_type, 16) (manufacturer_id, product_type, product_id, value.index))
product_id = int(value.node.product_id, 16) if result:
result = DEVICE_MAPPINGS_MTII.get( return result
(manufacturer_id, product_type, product_id, value.index)) return DEVICE_MAPPINGS_MT.get((manufacturer_id, product_type))
if result:
return result
return DEVICE_MAPPINGS_MT.get((manufacturer_id, product_type))
return None