code: def set_mode(self, mode):
          
          _LOGGER.debug('State change called from alarm device')
          if not mode:
              _LOGGER.info('No mode supplied')
          elif mode not in CONST.ALL_MODES:
              _LOGGER.warning('Invalid mode')
          response_object = self._lupusec.set_mode(CONST.MODE_TRANSLATION[mode])
          if response_object['result'] != 1:
              _LOGGER.warning('Mode setting unsuccessful')
  
          self._json_state['mode'] = mode
          _LOGGER.info('Mode set to: %s', mode)
          return True
docs: Set Lupusec alarm mode.