From 707a1149fd55872b417884b363ee499e0d4f38be Mon Sep 17 00:00:00 2001 From: Andreas Harter Date: Sat, 28 Dec 2019 20:05:00 +0100 Subject: [PATCH] Ensure all bots are returned during getProductIotMap During the use of the Ecovacs Home App, some bots do disappear from the app. This is due to the getProductIotMap endpoint handler using its own list of bots. This list contains only a fraction of the EcoVacsHomeProducts list maintained in models.py. Replacing the handler list with the global one follows DRY and simplifies maintenance in the future. --- bumper/confserver.py | 69 +------------------------------------------- 1 file changed, 1 insertion(+), 68 deletions(-) diff --git a/bumper/confserver.py b/bumper/confserver.py index 65d0483..9646ab6 100644 --- a/bumper/confserver.py +++ b/bumper/confserver.py @@ -855,74 +855,7 @@ class ConfServer: try: body = { "code": bumper.RETURN_API_SUCCESS, - "data": [ - { - "classid": "dl8fht", - "product": { - "_id": "5acb0fa87c295c0001876ecf", - "name": "DEEBOT 600 Series", - "icon": "5acc32067c295c0001876eea", - "UILogicId": "dl8fht", - "ota": False, - "iconUrl": "https://portal-ww.ecouser.net/api/pim/file/get/5acc32067c295c0001876eea", - }, - }, - { - "classid": "02uwxm", - "product": { - "_id": "5ae1481e7ccd1a0001e1f69e", - "name": "DEEBOT OZMO Slim10 Series", - "icon": "5b1dddc48bc45700014035a1", - "UILogicId": "02uwxm", - "ota": False, - "iconUrl": "https://portal-ww.ecouser.net/api/pim/file/get/5b1dddc48bc45700014035a1", - }, - }, - { - "classid": "y79a7u", - "product": { - "_id": "5b04c0227ccd1a0001e1f6a8", - "name": "DEEBOT OZMO 900", - "icon": "5b04c0217ccd1a0001e1f6a7", - "UILogicId": "y79a7u", - "ota": True, - "iconUrl": "https://portal-ww.ecouser.net/api/pim/file/get/5b04c0217ccd1a0001e1f6a7", - }, - }, - { - "classid": "jr3pqa", - "product": { - "_id": "5b43077b8bc457000140363e", - "name": "DEEBOT 711", - "icon": "5b5ac4cc8d5a56000111e769", - "UILogicId": "jr3pqa", - "ota": True, - "iconUrl": "https://portal-ww.ecouser.net/api/pim/file/get/5b5ac4cc8d5a56000111e769", - }, - }, - { - "classid": "uv242z", - "product": { - "_id": "5b5149b4ac0b87000148c128", - "name": "DEEBOT 710", - "icon": "5b5ac4e45f21100001882bb9", - "UILogicId": "uv242z", - "ota": True, - "iconUrl": "https://portal-ww.ecouser.net/api/pim/file/get/5b5ac4e45f21100001882bb9", - }, - }, - { - "classid": "ls1ok3", - "product": { - "_id": "5b6561060506b100015c8868", - "name": "DEEBOT 900 Series", - "icon": "5ba4a2cb6c2f120001c32839", - "UILogicId": "ls1ok3", - "ota": True, - "iconUrl": "https://portal-ww.ecouser.net/api/pim/file/get/5ba4a2cb6c2f120001c32839", - }, - }, - ], + "data": EcoVacsHomeProducts, } return web.json_response(body) -- 2.39.5