2020.12:用蓝图实现自动化!

欢迎来到 Home Assistant 核心 2020.12!

你现在看到的是我们的新版本编号方案。从现在开始,Home Assistant 核心将采用日历版本号,也就是由年份、月份和补丁号组成,用于表示错误修复版本。这也意味着我们的发布时间表发生了变化。Home Assistant 核心今后将在每个月的第一个星期三发布!

由于许多内容会在 Home Assistant Conference 上公布,这篇发布说明在接下来几天还会继续补充和调整更多内容。

对我来说,这是令人兴奋的一年!也感谢每一个为这个了不起项目做出贡献的人,无论你是以什么方式参与、贡献了什么内容。你们每一个人都很棒!❤️

随着假期季到来,也是时候稍微放慢脚步,和家人共度时光了。再过几周,新的一年就会开始;让我们一起把它变成美好的一年吧!

节日快乐,注意安全,也请在今年最后一次地:尽情享受这个版本!

../Frenck

蓝图

来和 Home Assistant 2020.12 的重磅新功能打个招呼吧:蓝图!

Screenshot of the 蓝图 配置 面板 Screenshot of the 蓝图 配置 面板.

自动化蓝图是一种预先创建好的自动化,并带有可由用户设置的选项。这让自动化的逻辑和输入可以彼此分离。听起来也许有点抽象,但实际上,它会让自动化更容易复用,也更容易使用。

想象一下这样一个蓝图:它能根据运动来控制灯光,并允许你配置用哪个运动传感器来触发、控制哪一盏灯。

现在,你可以基于同一个蓝图创建两个自动化; 它们各自拥有独立配置、彼此完全独立运行, 但又共享同一套自动化逻辑。

分享蓝图

蓝图非常适合拿来和社区分享你的自动化与想法。

我们创建了一个 Blueprint Exchange 论坛分类,你可以在那里发布自己创建的蓝图,供其他人使用!

我们相信,蓝图真正的力量就在于分享。 现在,即使别人使用的是 UI 编辑器,你也依然可以把复杂自动化分享给他们直接使用。

例如,你可以分享一个针对特定 Zigbee 遥控器的蓝图,把所有按钮映射到灯光控制; 也可以分享一个在发现电池没电时发送通知的蓝图; 或者一个当你拿起 Android 手机时自动静音音乐的蓝图。

关于可以分享的创意和自动化蓝图,真的几乎没有上限!

使用蓝图

长话短说,听起来很激动人心,但它到底意味着什么?

你可以把论坛帖子或 GitHub 上的 URL 复制进 UI 来导入蓝图。 随后,只要填写所需输入项,就能基于这些蓝图创建自动化。

Screenshot of a 蓝图 Screenshot of a 蓝图.

部署蓝图真的非常简单,而且还能部署多次! 蓝图在 UI 和 YAML 中都可以完整使用。

创建蓝图

我们准备了一份非常不错的教程,教你如何制作蓝图。

从本质上说,蓝图就是一个自动化,只是额外加入了一些蓝图元数据。 你几乎可以把任何现有自动化都转换成蓝图!

最后一步,别忘了把你新创建的蓝图分享到社区中的 Blueprint Exchange,帮助并启发其他人。

Nabu Casa Cloud TTS 的全新神经语音

If you have a Nabu Casa Home Assistant Cloud subscription, this 发布 brings in some really nice goodness for you. The text-to-speech 服务 offered by Nabu Casa has been extended and now supports a lot of new voices in many different languages.

This is a great alternative to, for example, the Google TTS 集成. The resulting audio is absolutely stunning and the neural voices sound supernatural.

This 服务 is automatically enabled when you are signed in to your Nabu Casa cloud account and can be called using the tts.cloud_say 服务 in your 自动化.

For example:

action:
  service: tts.cloud_say
  target:
    entity_id: media_player.family_room_speaker
  data:
    message: These new voices sound absolutely stunning!
    options:
      gender: female
    language: en-US

为实体分配区域,以及更易读的区域 ID

区域 have been around for a bit already. But, not everything supports 区域 yet. And using it in for example YAML-based 自动化, is not really an easy task to do.

Today that changes, as this 发布 works towards making 区域 more useful by making them more accessible and more universal.

The first change: individual 实体 can now be assigned to 区域.

Previously this was limited to 设备 only. This also works for 实体 without a 设备 (for example, 实体 provided by 助手). 设备 provide 实体, and thus it is now possible to override the 区域 with a single 实体 for a 设备 as well. For example, your in-wall mounted 开关 controls a 灯光 in another 房间.

Screenshot of assigning a 实体 to an 区域 Screenshot of assigning a 实体 to an 区域.

Second improvement: The ID of a newly 创建 区域 will now be based on the name of the 区域 instead of a random string.

This makes it easier to use 区域 in 服务 calls, as you can now use 区域 identifiers that actually make sense for a human! In a YAML 自动化 or 脚本 it will look like this:

action:
  - service: light.turn_on
    target:
      area_id: living_room

To find the 区域 ID for the 区域 you want to target, go to the 配置 面板, and edit the 区域 you want to target. In 区域 edit dialog, the ID is shown.

临时禁用设备

Do you have your Christmas tree set up in Home Assistant? After the Holidays are over, you store all those decorations for the next season. But what about those 设备 in Home Assistant?

Thanks to @emontnemery, you can now disable 设备 in Home Assistant. So, next year, when you unpack all decorations, enable them again and you're ready to go for another Holiday season!

Screenshot of disabling a 设备 Screenshot of disabling a 设备.

Of course, besides seasonal things, it can also be helpful if you have a broken 设备 or temporarily taking down any other 设备.

其他值得注意的变化

  • The Apple TV 集成 now supports tvOS 版本 13 and above and can be 设置 from the UI, thanks @postlund!
  • @thecode has been busy with the Shelly 集成 and added support for inputs, so you can now use the Shelly i3 and Shelly's in detached 状态.
  • Thanks to @adrum, the HomeKit controller 集成 now has support for (de)加湿器.
  • deCONZ now supports tilt on 遮盖, and preset and 风扇 for 温控 设备, thanks @Kane610!
  • @frenck added support for setting the repeat mode to the Spotify 集成.
  • The Nest 集成 now supports 摄像头 and doorbell events, thanks @allenporter!
  • Changes made to your KNX 集成's YAML 配置, can now be reloaded without restarting Home Assistant. Thanks @spacegaier!
  • The number formatting in the 前端 is more consistent, thanks to @joshmcrty!
  • @dmulcahey has been improving the 用户 experience of ZHA. The feedback when pairing a new Zigbee 设备 in the 前端 is improved, discovered 设备 are shown earlier with their progress, and the ZHA 配置 面板 now has a Zigbee network visualization tab! This allows you to see your network and find connection issues.
  • The rest 集成 can now handle request parameters, nicely done @boxcee!
  • Learn new RF commands using a Broadlink 遥控器! Thanks, @felipediel!
  • @mLupine extended templated 二元sensor and these now support templating the delay_on and delay_off!

新集成

We welcome the following new 集成 this 发布:

新平台

The following 集成 got support for a new platform:

现在可通过 UI 设置的集成

The following 集成 are now available via the Home Assistant UI:

发布 2020.12.1 - December 16

发布 2020.12.2 - December 30

如果你需要帮助……

...don't hesitate to use our very active forums or join us for a little chat.

Experiencing issues introduced by this 发布? Please report them in our issue tracker. Make sure to fill in all fields of the issue 模板.

不向后兼容的变更

Below is a listing of the breaking change for this 发布, per subject or 集成. Click on one of those to read more about the breaking change for that specific item.

Aurora

Configuring Aurora 传感器 via YAML has been removed (it was non-functional already). The Aurora 集成 can now be configured via the UI.

(@djtimca - #43045) (aurora docs)

证书过期

In order to optimize stability and performance of Home Assistant, time based 传感器 should use only absolute time values (store the date of the event) and not relative time values (seconds from event), so the value doesn't change each second.

The Certificate Expiry 集成 has both of them, so to adhere to Home Assistant architectural design rules, the offending relative time 传感器 is now removed.

If your 配置 was based on the relative time 传感器, please 开关 to the other one.

(@chemelli74 - #42338) (cert_expiry docs)

Solar-日志

Per ADR-0010, this 发布 deprecates YAML 配置 for the Solar-日志 集成. If you already use the Solar-日志 集成 you do not need to take 动作, as your 配置 has already been imported into the UI.

(@Ernst79 - #43484) (solarlog docs)

LCN

The logic operation 传感器 状态 are renamed from (not, or, and) to (none, some, all).

The renaming is more consistent with the LCN naming convention. When using the 状态 in an 自动化 ensure they are correctly renamed.

(@alengwenus - #43710) (lcn docs)

运行时间

In order to optimize stability and performance of Home Assistant, 传感器 should use only absolute time values (store the date of the event) and not relative time values (seconds from event) so the value doesn't change each second.

The Uptime 集成 is one leftover, so to adhere to Home Assistant architectural design rules, the 传感器 is now changed to a timestamp.

As a side effect of this change, the unit_of_measurement option of this 集成 is now deprecated and can be removed from your 配置 if you used that.

Please review your 自动化 and Lovelace 配置 to reflect this change.

(@chemelli74 - #43623) (uptime docs)

Keyring & Credstash

Support for storing secrets in Credstash and Keyring is deprecated and will be removed in March 2021.

(@balloob - #43854)

Apple TV

The Apple TV 集成 has been completely rewritten. Support for YAML is removed, so old 配置 must be removed and 设备 re-added via the 集成 page.

Furthermore, the old 服务 apple_tv.apple_tv_authenticate and apple_tv.apple_tv_scan are deprecated and replaced by the configration flow.

(@postlund - #31952) (apple_tv docs)

Telegram 机器人

The telegram bot 集成 now allows/accepts messages when either the allowed group (Chat ID) OR the 用户 ID of the sender matches.

This is a different behavior compared to before as before both Group (Chat ID) AND 用户 ID needed to be allowed. This allows members of a group to talk to the bot, even if they are not specifically listed as a 用户.

If you use Telegram groups, make sure you adjust your 配置 accordingly.

(@wicol - #43241) (telegram_bot docs)

告别以下内容

The following 集成 have been removed:

These 集成 where using webscraping, which is no longer allowed.

所有变更

点击查看所有变更!