def _control_resp(self, data, state):
if _is_control_response(data):<EOL><INDENT>ack_state = bytes([data[<NUM_LIT>]])<EOL>if state == ack_state:<EOL><INDENT>_LOGGER.debug("<STR_LIT>",<EOL>self.host, ord(ack_state))<EOL>return ack_state<EOL><DEDENT><DEDENT>
Handle a control response.

        :param data: Payload.
        :param state: Requested state.
        :returns: Acknowledged state.