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

feat: custom defined MIoT-Spec-V2 instance #953

Merged
merged 9 commits into from
Apr 5, 2025

Conversation

SusanPhevos
Copy link
Contributor

To solve #946 #41 #35

Added

  • Users can add MIoT-Spec-V2 instances by spec_add.json. xiaomi_home gets the device's MIoT-Spec-V2 from MIoT cloud, then deletes the spercific instances via spec_filter.yaml, then adds the instances via spec_add.json, and then modifies the instances via spec_modify.yaml.

@SusanPhevos SusanPhevos merged commit 899d616 into XiaoMi:main Apr 5, 2025
6 checks passed
@SusanPhevos SusanPhevos deleted the feat-spec-add branch April 5, 2025 03:37
return (
f'{ha_domain}.{self._model_strs[0][:9]}_{self.did_tag}_'
f'{self._model_strs[-1][:20]}_s_{siid}')
f'{self._model_strs[-1][:20]}_s_{siid}_{description}')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里修改了 unique_id ,会生成一个新的实体,并导致用户之前的实体不可用。
如果是有意要修改这个 unique_id 的话,建议可以加一个 migration 步骤帮助用户迁移
(一种可能的方案是 https://developers.home-assistant.io/docs/config_entries_config_flow_handler/#config-entry-migration

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