def match(self, query):
        """Try to find a match for a query in the channel commands.

        """
        if not self.can_select:
            ch_id = self._device._properties['selected_channel'].get_value()
            if ch_id in self._ids:
                self._selected = ch_id
            else:
                return

            response = self._match_dialog(query,
                                          self._dialogues['__default__'])
            if response is not None:
                return response

            response = self._match_getters(query,
                                           self._getters['__default__'])
            if response is not None:
                return response

        else:
            for ch_id in self._ids:
                self._selected = ch_id
                response = self._match_dialog(query,
                                              self._dialogues[ch_id])
                if response is not None:
                    return response

                response = self._match_getters(query,
                                               self._getters[ch_id])

                if response is not None:
                    return response

        return self._match_setters(query)
def match ( self , query ) : if not self . can_select : ch_id = self . _device . _properties [ 'selected_channel' ] . get_value ( ) if ch_id in self . _ids : self . _selected = ch_id else : return response = self . _match_dialog ( query , self . _dialogues [ '__default__' ] ) if response is not None : return response response = self . _match_getters ( query , self . _getters [ '__default__' ] ) if response is not None : return response else : for ch_id in self . _ids : self . _selected = ch_id response = self . _match_dialog ( query , self . _dialogues [ ch_id ] ) if response is not None : return response response = self . _match_getters ( query , self . _getters [ ch_id ] ) if response is not None : return response return self . _match_setters ( query )
Try to find a match for a query in the channel commands.