Fix clean area v2 for HA#1507
Conversation
Adjust CleanAreaV2 to handle SPOT_AREA mode correctly.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #1507 +/- ##
=======================================
Coverage 94.82% 94.82%
=======================================
Files 153 153
Lines 6010 6013 +3
Branches 350 351 +1
=======================================
+ Hits 5699 5702 +3
Misses 249 249
Partials 62 62 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| "type": mode.value, | ||
| "value": ",".join(str(i) for i in area), | ||
| } | ||
| if mode == CleanMode.SPOT_AREA: |
There was a problem hiding this comment.
This will break many bots as for example my bot does not support freeclean.
We don't can change it like this... We need to extend the capabilities so this command is aware of the model and changes only for the models which need it
|
Tested on T50 Pro Omni Gen2 (xztz07). The correct value format for freeClean is "count,room_id" per room, joined by semicolons. Example for two rooms: "1,1;1,2". Using "spotArea" as type returns code 20011. The fix should format value as ";".join(f"1,{int(i)}" for i in area). |
Makes the clean area method available to Home Assistant for newer models using the V2 API.
Related to: home-assistant/core#165933