diff --git a/custom_components/intellicenter/__init__.py b/custom_components/intellicenter/__init__.py index a5ffead..1a05672 100644 --- a/custom_components/intellicenter/__init__.py +++ b/custom_components/intellicenter/__init__.py @@ -126,9 +126,10 @@ def reconnected(self, controller): @callback def disconnected(self, controller, exc): """Handle updates from the Pentair system.""" - _LOGGER.info( - f"disconnected from system: '{controller.systemInfo.propName}'" - ) + if not controller.systemInfo is None: + _LOGGER.info( + f"disconnected from system: '{controller.systemInfo.propName}'" + ) dispatcher.async_dispatcher_send(hass, self.CONNECTION_SIGNAL, False) @callback diff --git a/custom_components/intellicenter/pyintellicenter/controller.py b/custom_components/intellicenter/pyintellicenter/controller.py index c0d81c5..fea10e5 100644 --- a/custom_components/intellicenter/pyintellicenter/controller.py +++ b/custom_components/intellicenter/pyintellicenter/controller.py @@ -116,6 +116,7 @@ def __init__(self, host, port=6681, loop=None): self._protocol = None self._diconnectedCallback = None + self._systemInfo = None self._requests = {}