Fix room detection for robots with 11+ field subsets#1457
Conversation
Robots like the DEEBOT X11 OmniCyclone (model class huhcip) return 11-field room subsets from getMapSet_V2, but _handle_rooms_subsets only matches exactly 10 fields. This causes the code to fall through to the 8-field path which calls GetMapSubSet — a command the X11 doesn't support (error 20003 "rcp not support"), resulting in empty room attributes on vacuum entities. Change == 10 to >= 10. The 10+ field branch only reads subset[0] (id) and subset[1] (name), so extra trailing fields are safely ignored.
Newer robots like the DEEBOT X11 OmniCyclone use the freeClean clean type instead of spotArea for room cleaning via clean_V2. Without this, room cleaning commands fail with error 20011 "unknown type". Adds CleanAreaFreeClean command class and FREE_CLEAN enum value, and updates the huhcip hardware definition to use it. Follow-up to DeebotUniverse#1457.
| ) -> HandlingResult: | ||
| # there are two versions of this message, depending on the number of values | ||
| if subsets and len(subsets[0]) == 10: | ||
| if subsets and len(subsets[0]) >= 10: |
There was a problem hiding this comment.
| if subsets and len(subsets[0]) >= 10: | |
| if subsets and len(subsets[0]) in (10, 11): |
We should be specific as Ecovacs is constantly changing api
Can you please verify if the values are still matching to your format and add a comment for the 11 field
There was a problem hiding this comment.
I cannot figure out what the 11th field is. It appears to be binary as I only see 0 or 1 values, but only one room in on each of my vacuums has the value set to 1. All of the other rooms are set to 0.
Is it okay that I don't know what it's for?
There was a problem hiding this comment.
Set it to unknown like the others. Are the other fields the same?
There was a problem hiding this comment.
I cannot figure out what the 11th field is. It appears to be binary as I only see 0 or 1 values, but only one room in on each of my vacuums has the value set to
1. All of the other rooms are set to0.Is it okay that I don't know what it's for?
The room coordinates are composed of 2 digits:
the map number (in my case 1st floor is map 1, 2nd floor is map 2) and the room number.
For instance, in the vavuum card, I define the shortcuts to clean a specific room like this:
- name: Clean dining room
service: vacuum.send_command
service_data:
command: clean_V2
params:
act: start
content:
type: freeClean
value: 1,3
icon: mdi:table-furniture
target:
device_id: cd66f34d9c274afd63333669b2aaeca7
Where 1 is the map number, 3 is the room number
I hope this helps.
| ], | ||
| ids=["10-field", "11-field"], | ||
| ) | ||
| def test_handle_rooms_subsets_field_count( |
There was a problem hiding this comment.
We should not test internal functions instead add a test similar to the others
Newer robots like the DEEBOT X11 OmniCyclone use the freeClean clean type instead of spotArea for room cleaning via clean_V2. Without this, room cleaning commands fail with error 20011 "unknown type". Adds CleanAreaFreeClean command class and FREE_CLEAN enum value, and updates the huhcip hardware definition to use it. Follow-up to DeebotUniverse#1457.
|
Drafting it as requested, changes are not implemented. Set it to ready to review after implementing it |

Problem
Robots like the DEEBOT X11 OmniCyclone (model class
huhcip) return 11-field room subsets fromgetMapSet_V2, but_handle_rooms_subsetsonly matches exactly 10 fields (len(subsets[0]) == 10).This causes the code to fall through to the 8-field path which calls
GetMapSubSet— a command the X11 doesn't support, returning error code 20003 ("rcp not support"). The result is empty room attributes on vacuum entities in Home Assistant.Fix
Change
== 10to>= 10. The 10+ field branch only readssubset[0](id) andsubset[1](name), so extra trailing fields are safely ignored.The 11th field appears to be related to floor material/carpet detection, consistent with the X11's automatic carpet recognition feature.
Tested on