def bytes_to_label(label_bytes):
    """
    Takes the bytes from a TYPE_STATELABEL packet removes the NUL char and
    and everything after, then converts it to unicode.

    :param label_bytes: The bytes from the TYPE_STATELABEL packet
    :returns: unicode -- The label of the device
    """
    strlen = label_bytes.find('\x00')
    return label_bytes[0:strlen].decode('utf-8')