def stop(self):
    if self._add_device_event is not None:
      try:
        events.cancel(self._add_device_event)
      except __HOLE__:
        pass

    if self._home_id is not None:
      self._manager.writeConfig(self._home_id)
    self._manager.removeWatcher(self._callback)
    self._manager.removeDriver(self._device)
dataset/ETHPy150Open tomwilkie/awesomation/src/pi/zwave.py/ZWave.stop