'Execute `command` and return the response.'

@classmethod
def telnet_request(cls, telnet, command, all_lines=False):

    _LOGGER.debug('Sending:    %s', command)
    telnet.write((command.encode('ASCII') + '\r'))
    lines = []
    while True:
        line = telnet.read_until('\r', timeout=0.2)
        if (not line):
            break
        lines.append(line.decode('ASCII').strip())
        _LOGGER.debug('Recived:    %s', line)
    if all_lines:
        return lines
    return lines[0]
