For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /developers/blog/2024-10-31-update-entity-changes.md.

Update entity 的变更

变更摘要

update entity 已做出以下调整:

  • in_progress 属性及其对应的 state attribute 现在应仅为一个 bool,用于指示是否有更新正在进行,或者在未知时为 None
  • 新增了一个属性和对应的 state attribute update_percentage,它可以返回一个表示 0 到 100% 进度的 intfloat,或者为 None。
  • 新增了一个属性和对应的 state attribute display_precision,用于在 update_percentagefloat 时控制前端显示的十进制位数。

向后兼容性

直到 Home Assistant Core 2025.12,in_progress 属性中的数值会自动复制到 update_percentage state attribute。

文档与 core 实现

详情请参阅 update entity 开发者文档

PR 列表: