try to parse more attrib

add strings from n79 to bumper that are then passed to hass
This commit is contained in:
bittles
2022-12-23 22:19:11 -05:00
parent c749bca96c
commit 5727372268
3 changed files with 19 additions and 9 deletions
+3
View File
@@ -3,6 +3,9 @@ import logging
import random
import string
##import asyncio ## to do
#just included the modified sucks in component
from .sucksbumper import EcoVacsAPI, VacBot
import voluptuous as vol
+3 -3
View File
@@ -1,10 +1,10 @@
{
"domain": "ecovacs",
"name": "Ecovacs Bumper",
"version": "1.0.1",
"version": "1.0.2",
"documentation": "https://www.home-assistant.io/integrations/ecovacs",
"requirements": ["sleekxmppfs>=1.3.4", "click>=6", "requests>=2.18", "pycryptodome>=3.4", "pycountry-convert>=0.5", "paho-mqtt>=1.4", "stringcase>=1.2"],
"requirements": ["sleekxmppfs==1.4.1", "click>=6", "requests>=2.18", "pycryptodome>=3.4", "pycountry-convert>=0.5", "paho-mqtt>=1.4", "stringcase>=1.2"],
"codeowners": ["@OverloadUT", "@mib1185"],
"iot_class": "cloud_push",
"iot_class": "local_polling",
"loggers": ["sleekxmppfs", "sucksbumper"]
}
+13 -6
View File
@@ -83,9 +83,10 @@ CLEAN_MODE_FROM_ECOVACS = {
'border': CLEAN_MODE_EDGE,
'spot': CLEAN_MODE_SPOT,
'spot_area': CLEAN_MODE_SPOT_AREA,
'SpotArea': CLEAN_MODE_SPOT_AREA,
'singleroom': CLEAN_MODE_SINGLE_ROOM,
'stop': CLEAN_MODE_STOP,
'going': CHARGE_MODE_RETURNING
'going': CHARGE_MODE_RETURNING,
}
FAN_SPEED_TO_ECOVACS = {
@@ -95,32 +96,38 @@ FAN_SPEED_TO_ECOVACS = {
FAN_SPEED_FROM_ECOVACS = {
'standard': FAN_SPEED_NORMAL,
'strong': FAN_SPEED_HIGH
'strong': FAN_SPEED_HIGH,
}
CHARGE_MODE_TO_ECOVACS = {
CHARGE_MODE_RETURN: 'go',
CHARGE_MODE_RETURNING: 'Going',
CHARGE_MODE_CHARGING: 'SlotCharging',
CHARGE_MODE_IDLE: 'Idle'
CHARGE_MODE_IDLE: 'Idle',
}
CHARGE_MODE_FROM_ECOVACS = {
'going': CHARGE_MODE_RETURNING,
'Going': CHARGE_MODE_RETURNING,
'slot_charging': CHARGE_MODE_CHARGING,
'idle': CHARGE_MODE_IDLE
'SlotCharging': CHARGE_MODE_CHARGING,
'idle': CHARGE_MODE_IDLE,
'Idle': CHARGE_MODE_IDLE,
}
COMPONENT_TO_ECOVACS = {
COMPONENT_MAIN_BRUSH: 'Brush',
COMPONENT_SIDE_BRUSH: 'SideBrush',
COMPONENT_FILTER: 'DustCaseHeap'
COMPONENT_FILTER: 'DustCaseHeap',
}
COMPONENT_FROM_ECOVACS = {
'brush': COMPONENT_MAIN_BRUSH,
'Brush': COMPONENT_MAIN_BRUSH,
'side_brush': COMPONENT_SIDE_BRUSH,
'dust_case_heap': COMPONENT_FILTER
'SideBrush': COMPONENT_SIDE_BRUSH,
'dust_case_heap': COMPONENT_FILTER,
'DustCaseHeap': COMPONENT_FILTER,
}
def str_to_bool_or_cert(s):