0.30: More Async, HASSbian, Digital Ocean, statistics, REST

没错,只过了九天我们就发布了 0.30。别担心,我们会尽量保持常规发布节奏,不会变成天天发版。

你可能已经知道了:树莓派 图像 现已可用。对于 Hassbian,@Landrash 将 Home Assistant 所需的关键部分整合成了一个易用的树莓派设备镜像。Hassbian 还很年轻,我们非常期待收到你的反馈问题报告改进建议,一起把它做得更好。

目前开发资源的很大一部分,仍然投入在继续把 Home Assistant 往异步编程方向推进。这项工作非常耗时,也会伴随一些段错误,以及在特定传感器组合下出现实例不稳定的问题。但它带来的回报,是未来明显的性能提升。

为了减少测试运行时间,@balloob 做了很多优化。目前我们临时排除了 RFXtrx 测试,这让你的 Pull Request 所需测试时间大约减半。

文档

现在所有配置示例都尽量精简。这可以帮助初学者和新用户避免困惑,因为他们看到的是“必需项”,而不是包含所有可选项的完整样例。如果你的 configuration.yaml 中某个条目有问题,错误消息会提供一个指向文档的 URL。

Hacktoberfest 一开始,文档相关的 Pull Request 就大量涌入。向所有参与者致以衷心感谢!我们还要特别给 @hillaryfraley 发一块“虚拟小饼干”。她目前已经提交了大约十几个 Pull Request,不仅修复了拼写错误,还补全了完整章节。Hacktoberfest 仍在进行中,我们也期待收到更多 Pull Request。

Statistics

我们想通过 statistics 传感器 介绍一个全新传感器,它和 模板 传感器trend 传感器 有些类似。这个传感器会读取另一个传感器的值,并对数据进行统计分析。它会基于一组样本计算平均值、最小值/最大值、总和、标准差和方差,这些结果都可以用于你的自动化规则。如果数据源是二元传感器,它还会统计状态变化次数。

由于这些结果是实时计算的,如果你想做更深入的历史分析,仍然需要使用数据库中的数据。你可以查看最新的 notebook,了解如何对 Home Assistant 数据库做统计分析。

REST! We don't...

我们在 RESTful API 相关实现上投入了很多工作。@w1ll1am23 扩展了 aREST 平台,现在可以显示某个 aREST 单元是否可用。aREST 实现也已经纳入配置检查范围。更多细节请查看 Backward-incompatible changes 部分。

REST 传感器 现在支持 HTTP 认证(basic 和 digest)以及自定义请求头。这让你可以访问受保护的资源。下面这个示例传感器会访问 GitHub 并获取最新发布号,同时绕过未认证请求的速率限制。

sensor
  - platform: rest
    resource: https://api.github.com/repos/home-assistant/home-assistant/releases/latest
    username: YOUR_GITHUB_USERNAME
    password: YOUR_GITHUB_ACCESS_TOKEN
    authentication: basic
    value_template: ""
    headers:
      Accept: application/vnd.github.v3+json
      Content-Type: application/json
      User-Agent: Home Assistant REST sensor

Misc

  • GitHub 在最近一次更新中发布了 review 功能。你在审阅开放 Pull Request 时,可以更灵活地管理评论。
  • 感谢 @robbiet480,我们现在启用了 mention-bot。当你创建新的 Pull Request 时,它会帮助你识别潜在审阅者。
  • Home Assistant Community Forum 现在新增了一个名为“安装”的版块。

All changes

发布 0.30.1 - October 8

  • 设备 Tracker known_devices.yaml validation is now more accepting (@kellerza)
  • Handle X10 灯光 numbers greater than 9 (@mtl010957)
  • Fix command line 遮盖 without a 模板 (@roidayan)

发布 0.30.2 - October 12

  • Handle Volvo's with dashes in their name (@molobrakos)
  • Fix some html5 push 通知 配置 options were discarded after first use (@T3m3z)
  • Fix Homematic 设备 name with autodiscovery (@pvizeli)
  • Make 'pin' optional for Zigbee 设备 config (@flyte)
  • Fix when sending a 通知 to a 服务 with target attached (i.e., notify.html5_unnamed_device_2) the target was not submitted to the platform as a list causing iteration over every character in the string. (@robbiet480)
  • Fix for Slack targets (@fabaff)
  • Fix for Pushover targets (@Nixon506E)

Backward-incompatible changes

  • All deprecated 条件 options from automation have been removed (deprecated since May and have printed 警告 to your console):
    • use_trigger_values is gone. You have to copy your 触发器 to 条件 and adjust for the correct config.
    • condition_type is gone. Use condition: or instead.
    • To specify the type of a 条件, use condition: instead of platform:.
  • The Forecast.io was renamed to Dark Sky. Replace your - platform: forecast with - platform: darksky.
  • The aREST 配置 between the 传感器 and the 开关 platform was aligned.

If you need help...

...don't hesitate to use our Forum or join us for a little chat. The 发布 notes have comments enabled but it's preferred if you the former communication channels. Thanks.