docs: def __query_cmd(self, command, device=None):
          """Calls a command"""
          base_url = u'%s&switchcmd=%s' % (self.__homeauto_url_with_sid(), command)
  
          if device is None:
              url = base_url
          else:
              url = '%s&ain=%s' % (base_url, device)
  
          if self.__debug:
              print(u'Query Command URI: ' + url)
  
          return self.__query(url)