fix: Fix the HA warning in the logs related to vacuum state setting #694
+47
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix: Fix the HA warning in the logs related to vacuum state setting
Adapt to new vacuum state property, set the activity property instead of directly setting the state property.
这个PR有几点需要各位帮忙看看:
VacuumActivity,对照不到的按原有方式返回字符串。
因为不同品牌的状态名拼写可能会有差异,是否按照讨论 MIoT-Spec-V2 内定义的值是否需要统一使用常量? #682 中的,在const文件中统一使用常量定义,还是用一个trans map?
2.随机查看了几款扫地机器人的spec,发现很多status的值强行映射到VacuumActivity的6个状态有点不合适,尤其是类似M30这类功能非常多的型号。等到2026.1版本如何处理这种问题?
3.PR中通过property的value去查找value list中对应的原始name,(description好像是翻译过的,不太合适对照),逻辑有点怪怪的,在初始化中新增一个value:name的map,是不是更好一点?
@topsworld @SusanPhevos