def lookup_unit_for_sensor_type(sensor_type): """Get unit for sensor type. Async friendly. """ field_abbrev = {v: k for k, v in PACKET_FIELDS.items()} return UNITS.get(field_abbrev.get(sensor_type))
def lookup_unit_for_sensor_type(sensor_type): """Get unit for sensor type. Async friendly. """ from rflink.parser import UNITS, PACKET_FIELDS field_abbrev = {v: k for k, v in PACKET_FIELDS.items()} return UNITS.get(field_abbrev.get(sensor_type))