'Send a key to the tv and handles exceptions.'

def send_key(self, key):

    try:
        self.get_remote().control(key)
        self._state = STATE_ON
    except (self._exceptions_class.UnhandledResponse, self._exceptions_class.AccessDenied, BrokenPipeError):
        self._state = STATE_ON
        self._remote = None
        return False
    except (self._exceptions_class.ConnectionClosed, OSError):
        self._state = STATE_OFF
        self._remote = None
        return False
    return True
