title: '0.102:官方 Android 应用、Almond、场景编辑器' description: 'Home Assistant 0.102 来了!由于我们上周举办了一年一度的项目现状演讲,这次发布准备过程相当忙碌,也分走了不少精力。这并不意味着这次没有什么可分享的内容,只是发布说明可能没有那么精修。 本页属于 Home Assistant 中文博客与更新记录,适合了解版本演进、功能变更与社区动态。' 账号关联。

0.102:官方 Android 应用、Almond、场景编辑器

Home Assistant 0.102 来了!由于我们上周举办了一年一度的项目现状演讲,这次发布准备过程相当忙碌,也分走了不少精力。这并不意味着这次没有什么可分享的内容,只是发布说明可能没有那么精修。

首先,我们在阿姆斯特丹 ING 办公室举办了今年的项目现状演讲!现场非常棒。你可以在 YouTube 上观看回放,或者关注即将发布的博客文章,我们会在里面总结所有公告。

那么,这次有什么新内容?很多。

Android 应用已发布!

在项目现状演讲上,我们宣布已经发布了官方 Home Assistant Android 应用 的首个版本。它仍在持续开发中,但基础功能已经可以正常使用。

它由 @CedrickFlocon 开发,源码已经在 GitHub 上公开。我们也已经看到其他开发者加入进来,这真的太好了!欢迎继续参与。

私有语音助手

我们与斯坦福合作,将他们开源且注重隐私的虚拟助手 Almond 深度集成进 Home Assistant。更多信息请参阅单独的博客文章

账号关联

有些公司只允许我们通过云 API 来集成他们的产品。这些云 API 通常使用 OAuth2 规范 来进行账号关联。问题在于,这套规范并不能很好地处理非公开或去中心化的安装方式。

因此,在今天之前,如果你要通过 OAuth2 关联一个集成,你必须先注册开发者账号、配置 Home Assistant,并把实例公开到互联网上,之后才能进入账号关联步骤。这显然不够理想!

Home Assistant Cloud 正在推出一项新的账号关联服务,所有人都可以免费使用,而且不需要云账号。有了这项服务,Home Assistant 会管理开发者账号,而你只需要完成自己的账号关联即可。

第一个使用这项新服务的集成是 Somfy。当然,你仍然可以手动配置。这个集成建立在我们的全新 OAuth2 框架之上。我们预计未来会有更多集成开发者把 OAuth2 集成迁移过来。

用自然语言创建自动化

作为一项实验性功能,我们加入了一种全新的自动化创建方式。在 Almond 的帮助下,我们可以把自然语言转换成 Home Assistant 自动化。

Screenshot of the create 自动化 dialog. 创建自动化对话框截图。

当你在自动化编辑器中选择 + 添加新的自动化时,会看到一个新的对话框,你可以直接用自然语言描述自己想要的自动化,比如:Turn on the lights when I come home。我们会尝试把它转换成一个自动化。如果这个自动化还需要指定设备或人物,我们也会进一步向你询问。之后,你可以在编辑器中检查生成结果并保存。

请注意,目前并非所有设备都已受支持,而且 Almond 还需要更多训练来给出更好的结果。如果你想帮助 Almond 变得更好,可以查看前面 Almond 相关部分的说明。

场景编辑器

Screenshot of the 场景 editor. Screenshot of the 场景 editor.

我们还推出了一个场景编辑器。借助场景编辑器,你可以轻松把设备状态保存到场景中。你只需要选择想要包含在场景中的设备(如果你使用高级模式,也可以选择实体),然后把它们设置成你希望在场景激活时呈现的状态。

要使用场景编辑器,你的场景配置需要放在配置目录中的 scenes.yaml 文件里,并在 configuration.yaml 中引入。每个场景都需要有唯一的 ID,编辑器才能正常工作。

# scenes.yaml
- id: my_unique_id # <-- Required for editor to work.
  name: Romantic
  entities:
    light.tv_back_light: on
    light.ceiling:
      state: on
      xy_color: [0.33, 0.66]
      brightness: 200

然后把你的 configuration.yaml 更新成下面这样:

# Configuration.yaml example
scene: !include scenes.yaml

其他消息

Andrew 学会了 Swift,并为 Mac 做了一个新的迷你应用:

我们的 Android 应用并不是最近唯一的新应用。@tuanha2000vn 还发布了 Hasskit,这是一个基于 Flutter 构建、可同时运行在 Android 和 iOS 上的新应用。

最后,Brad 在 Reddit 上发布了一段视频,展示了他在 Lovelace 中对 picture elements 的精彩用法。来看看吧:

现在,Xiaomi 扫地机器人用户也可以使用这个很棒的自定义 Lovelace 卡片:

New 集成

新平台

如果你需要帮助……

欢迎使用我们非常活跃的论坛,或者加入我们的聊天频道

问题反馈

如果你遇到了这个版本引入的问题,请在我们的 issue tracker 中报告。请务必填写 issue 模板中的所有字段。

Backward-incompatible changes

  • Huawei LTE - 配置 has been consolidated below huawei_lte. 设备 tracker no longer uses known_devices.yaml but 实体 registry. - (@scop - #26675) (huawei_lte docs)

    Example 配置 yaml:

    huawei_lte:
      - url: http://192.168.100.1/
        username: admin
        password: something
  • Ikea Tradfri - This removes the battery 传感器 that was 创建 for the signal repeater. The 传感器 would never have a 状态, and after some inspection, it does not look like that 设备 present any valuable metrics. - (@ludeeus - #28181) (tradfri docs)

  • UPNP/IGD - All UPNP/IGD 传感器 are now in one 设备. You have to remove and re-add the 集成 to get rid of the previous 设备. (@escoand - #27517) (upnp docs)

  • PS4 - 状态 off is now 状态 standby. Affects 用户 defined 脚本, 自动化, etc. (@ktnrg45 - #28261) (ps4 docs)

  • SSDP - ssdp in manifest.json has changed; it is now a list of dicts, and as we now match using the UPnP 设备 description fields directly, device_type has to be renamed to deviceType. No included 集成 use it at the moment, nor are they broken by this change. If any custom 集成 are using it, they need to adjust accordingly. (@scop - #28285) (ssdp docs)

  • HomematicIP Cloud - The 属性 naming between Homematic IP HmIP-BSM (灯光) and HmIP-FSM/HmIP-PSM (开关) was different and in case of 灯光 not correct. The 属性 for HmIP-BSM have been renamed:

    • energy_counter_kwh --> today_energy_kwh
    • power_consumption --> current_power_w

    Please check your 自动化, 脚本, 场景, etc., if you are using the old 属性 in 模板, and replace them with the new ones. - (@SukramJ - #28271) (homematicip_cloud docs)

  • Plugwise - Detection of a legacy Anna (firmware 1.8.x) is no longer automatic: owners of a legacy Anna have to provide info in 配置.yaml, the last line. This change was needed to be able to fix issue #26520. - (@bouwew - #28237) (plugwise docs)

    Example 配置 yaml:

    climate:
      - platform: plugwise
        name: your_device_name
        password: your_password
        host: your_anna_ip
        legacy_anna: true
  • Android TV - The source and sources_list 属性 for Fire TV 设备 will use friendly app names instead of app IDs (e.g., "Netflix" instead of "com.netflix.ninja"). If you are using these 属性 in 自动化, 传感器, etc., you will need to 更新 them.

    • If you are currently checking that the source 属性 of a Fire TV 设备 is a particular app ID, you have two options:
      • Check the app_id 属性 instead
      • Replace that app ID with the friendly name for the app.
    • If you are currently checking the sources_list 属性, then you will need to check for friendly app names instead of app IDs.

    You can still use app IDs for the 媒体播放器.select_source 服务. - (@JeffLIrion - #28417) (androidtv docs)

  • Homekit - Thermostats supported by the Homekit Controller component were reporting "off" for the running status when the HVAC was powered on but not actively heating or cooling. This hvac_action 属性 will now properly return "idle" instead of off. Any logic that tests for the hvac_action 条件 of off will need to change to idle. There is no change to any other 状态. - (@GaryOkie - #28625) (homekit_controller docs)

  • OpenALPR local - The "alp_bin" option has been corrected to "alpr_bin" as is outlined in the 文档. 用户 should check their config and 更新 if necessary. (@HexF - #28746) (openalpr_local docs)

Beta Fixes

发布 0.102.1 - November 21

发布 0.102.2 - November 24

发布 0.102.3 - November 29

All changes