Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix the HA warning in the logs related to vacuum state setting #694

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

zghnwsq
Copy link
Contributor

@zghnwsq zghnwsq commented Jan 23, 2025

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有几点需要各位帮忙看看:

  1. VacuumActivity中只有6个状态,目前是根据扫地机器人SPEC中的值集名称(对应MIoTSpecValueList中的names)对照到
    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

@CLAassistant
Copy link

CLAassistant commented Jan 23, 2025

CLA assistant check
All committers have signed the CLA.

@zghnwsq
Copy link
Contributor Author

zghnwsq commented Jan 23, 2025

关于第一点,能不能统计下所有vacuum产品的status共有哪些状态? 尤其是Go Charging这种中间有空格,而有的状态多个单词中间又没空格

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants