From 42356582cc870d2a2e94146a34f3e65c2883617a Mon Sep 17 00:00:00 2001 From: bittles Date: Mon, 2 Jan 2023 20:19:37 -0500 Subject: [PATCH] remove what i think are some unneeded changes --- custom_components/ecovacs/manifest.json | 2 +- custom_components/ecovacs/sucksbumper.py | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/custom_components/ecovacs/manifest.json b/custom_components/ecovacs/manifest.json index 9e4589a..2163424 100644 --- a/custom_components/ecovacs/manifest.json +++ b/custom_components/ecovacs/manifest.json @@ -1,7 +1,7 @@ { "domain": "ecovacs", "name": "Ecovacs Bumper", - "version": "1.3.3", + "version": "1.3.4", "documentation": "https://github.com/bittles/ha_ecovacs_bumper", "issue_tracker": "https://github.com/bittles/ha_ecovacs_bumper/issues", "requirements": ["sleekxmppfs==1.4.1", "click>=6", "requests>=2.18", "pycryptodome>=3.4", "pycountry-convert>=0.5", "paho-mqtt>=1.4", "stringcase>=1.2"], diff --git a/custom_components/ecovacs/sucksbumper.py b/custom_components/ecovacs/sucksbumper.py index b479aac..ea2bb44 100644 --- a/custom_components/ecovacs/sucksbumper.py +++ b/custom_components/ecovacs/sucksbumper.py @@ -108,11 +108,11 @@ CHARGE_MODE_TO_ECOVACS = { CHARGE_MODE_FROM_ECOVACS = { 'going': CHARGE_MODE_RETURNING, - 'Going': CHARGE_MODE_RETURNING, +# 'Going': CHARGE_MODE_RETURNING, 'slot_charging': CHARGE_MODE_CHARGING, - 'SlotCharging': CHARGE_MODE_CHARGING, +# 'SlotCharging': CHARGE_MODE_CHARGING, 'idle': CHARGE_MODE_IDLE, - 'Idle': CHARGE_MODE_IDLE, +# 'Idle': CHARGE_MODE_IDLE, } COMPONENT_TO_ECOVACS = { @@ -123,11 +123,11 @@ COMPONENT_TO_ECOVACS = { COMPONENT_FROM_ECOVACS = { 'brush': COMPONENT_MAIN_BRUSH, - 'Brush': COMPONENT_MAIN_BRUSH, +# 'Brush': COMPONENT_MAIN_BRUSH, 'side_brush': COMPONENT_SIDE_BRUSH, - 'SideBrush': COMPONENT_SIDE_BRUSH, +# 'SideBrush': COMPONENT_SIDE_BRUSH, 'dust_case_heap': COMPONENT_FILTER, - 'DustCaseHeap': COMPONENT_FILTER, +# 'DustCaseHeap': COMPONENT_FILTER, } def str_to_bool_or_cert(s): @@ -434,8 +434,13 @@ class VacBot(): self.xmpp.subscribe_to_ctls(self._handle_ctl) else: - self.iotmq = EcoVacsIOTMQ(user, domain, resource, secret, continent, vacuum, server_address, verify_ssl=verify_ssl) - self.iotmq.subscribe_to_ctls(self._handle_ctl) + if self.server_address is not None: + vacuum = {"did": "none", "class": "none"} + self.iotmq = EcoVacsIOTMQ("sucks", "ecouser.net", "", "", "", vacuum, server_address, verify_ssl=verify_ssl) + self.iotmq.subscribe_to_ctls(self._handle_ctl) + else: + self.iotmq = EcoVacsIOTMQ(user, domain, resource, secret, continent, vacuum, server_address, verify_ssl=verify_ssl) + self.iotmq.subscribe_to_ctls(self._handle_ctl) #The app still connects to XMPP as well, but only issues ping commands. #Everything works without XMPP, so leaving the below commented out. #self.xmpp = EcoVacsXMPP(user, domain, resource, secret, continent, vacuum, server_address)