diff --git a/custom_components/ecovacs/__init__.py b/custom_components/ecovacs/__init__.py index ddf1bc2..aace99b 100644 --- a/custom_components/ecovacs/__init__.py +++ b/custom_components/ecovacs/__init__.py @@ -23,8 +23,6 @@ from .const import ( CONF_CONTINENT, CONF_BUMPER, CONF_BUMPER_SERVER, - SERVER_ADDRESS, - VERIFY_SSL, LOGGER ) @@ -52,14 +50,18 @@ ECOVACS_API_DEVICEID = "".join( def setup(hass: HomeAssistant, config: ConfigType) -> bool: """Set up the Ecovacs component.""" LOGGER.debug("Creating new Ecovacs component") + hass.data[ECOVACS_DEVICES] = [] # if we're using bumper then define the server address if CONF_BUMPER == True: SERVER_ADDRESS = (config[DOMAIN].get(CONF_BUMPER_SERVER), 5223) VERIFY_SSL = False - # if not server address is null and verify ssl true from const - LOGGER.info("Bumper is set to %s with server address and verify ssl %s", CONF_BUMPER, VERIFY_SSL) + else: + SERVER_ADDRESS = None + VERIFY_SSL = True + # if not server address is null and verify ssl true + LOGGER.info("Bumper is set to %s with server address %s and verify ssl %s", CONF_BUMPER, SERVER_ADDRESS, VERIFY_SSL) ecovacs_api = EcoVacsAPI( ECOVACS_API_DEVICEID, diff --git a/custom_components/ecovacs/const.py b/custom_components/ecovacs/const.py index fd60050..02b86cb 100644 --- a/custom_components/ecovacs/const.py +++ b/custom_components/ecovacs/const.py @@ -9,6 +9,4 @@ CONF_COUNTRY = "country" CONF_CONTINENT = "continent" #bumper config vars CONF_BUMPER = "bumper" -CONF_BUMPER_SERVER = "bumper_server" -SERVER_ADDRESS = None -VERIFY_SSL = True \ No newline at end of file +CONF_BUMPER_SERVER = "bumper_server" \ No newline at end of file