def lights_off(connection, await_response=False):

    """Send a serial command over the given connection to turn off all lights"""

    command = "X0100"

    connection.write(bytes(command, 'UTF-8'))
    if await_response:
        response = connection.readline().decode("UTF-8").strip()
        return response == "Y0100"

    return True