docs: def _close_connection(self):
          """Close the connection to the easyfire unit."""
          if (self._mode == PROP_MODE_SERIAL):
              self._serial.close()
          elif (self._mode == PROP_MODE_TCP):
              self._socket.close()
          elif (self._mode == PROP_MODE_FILE):
              self._file.close()