code: def connection_lost(self, exc):
          
          if self.state == STATE_RUNNING:
              _LOGGER.warning('Lost connection to deCONZ')
              self.retry()
docs: Happen when device closes connection or stop() has been called.