@asyncio.coroutine<EOL><INDENT>def send_command_ack(self, device_id, action):<DEDENT>
<EOL>yield from self._ready_to_send.acquire()<EOL>acknowledgement = None<EOL>try:<EOL><INDENT>self._command_ack.clear()<EOL>self.send_command(device_id, action)<EOL>log.debug('<STR_LIT>')<EOL>try:<EOL><INDENT>yield from asyncio.wait_for(self._command_ack.wait(),<EOL>TIMEOUT.seconds, loop=self.loop)<EOL>log.debug('<STR_LIT>')<EOL><DEDENT>except concurrent.futures._base.TimeoutError:<EOL><INDENT>acknowledgement = {'<STR_LIT>': False, '<STR_LIT:message>': '<STR_LIT>'}<EOL>log.warning('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>acknowledgement = self._last_ack.get('<STR_LIT>', False)<EOL><DEDENT><DEDENT>finally:<EOL><INDENT>self._ready_to_send.release()<EOL><DEDENT>return acknowledgement<EOL>
Send command, wait for gateway to repond with acknowledgment.