From 7b26f4a22e0d9230a3c67f60a9b9c04bd9d2f5ed Mon Sep 17 00:00:00 2001 From: Luke Bonaccorsi Date: Thu, 24 Aug 2023 16:35:13 +0100 Subject: [PATCH] Don't attempt to update the IP if it's not set --- custom_components/robovac/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/robovac/__init__.py b/custom_components/robovac/__init__.py index e8c48cb..ed23813 100644 --- a/custom_components/robovac/__init__.py +++ b/custom_components/robovac/__init__.py @@ -41,7 +41,7 @@ async def async_setup(hass, entry) -> bool: return hass_data = entry.data.copy() - if device["gwId"] in hass_data[CONF_VACS]: + if device["gwId"] in hass_data[CONF_VACS] and device.get(CONF_IP_ADDRESS) is not None: if ( hass_data[CONF_VACS][device["gwId"]]["ip_address"] != device[CONF_IP_ADDRESS]