2021.3:My Oh My

Home Assistant Core 2021.3 来了!还有让人眼前一亮的 My Home Assistant!

我对这次发布超级兴奋!整整 13 个全新集成!而 Z-Wave JS 也在以近乎疯狂的速度持续前进;感谢所有一起投入其中的人!🎉

对我来说,这次发布的重点有两个:My Home Assistant,以及一系列围绕服务调用打造的全新 UI 功能。它们具体是什么,下面会详细介绍,但两者都有一个共同点:让事情变得更简单。

那么,尽情享受这次发布吧!

../Frenck

My Home Assistant

今天,我们向你介绍:

为了更好地帮助你,我们经常希望把你直接带到自己 Home Assistant 实例中的某个特定页面。但每个 Home Assistant 实例的地址都不同。你的地址可能是 http://homeassistant.local:8123,也可能完全不是这样。

My Home Assistant 让文档、论坛、聊天、博客,或者任何其他网站,都能在不知道你实例 URL 的前提下,直接链接到你 Home Assistant 实例中的特定页面。

它最棒的地方在于:所有数据都保存在你本地浏览器里,而 My Home Assistant 只会把你重定向到能显示实例信息或帮助你开始某个操作的页面。

通过 My Home Assistant 打开的链接,永远不会主动修改你的实例。

长话短说!借助它,我们可以做很多非常有帮助的事情。比如,下面这些按钮就能把你直接带到自己实例中的对应页面:

而且我们还能为很多界面创建按钮或链接,甚至可以帮助你开始添加集成的配置、导入蓝图、跳转到插件页面等等,能做的事情还有很多!

Screen recording showing how My Home Assistant works Setting up a new 集成 on your instance, from the 文档 using My Home Assistant.

此外,我们还加入了一个链接/徽章生成器,这样你就可以自己创建链接,例如把它加到 Blueprint Exchange 中的某个蓝图里。

https://my.home-assistant.io/create-link/

最后,我们的移动应用也即将支持 My Home Assistant!Android 预计会在今天通过更新提供支持,iOS 版本也会很快跟进。

服务调用的新 UI

这次发布为服务调用带来了全新的用户界面!

Screenshot of new call 服务 in the 开发者工具 Screenshot of the new UI in the 服务 tab of the 开发者工具.

这个界面看起来也许会有些眼熟,因为它使用了和前不久推出的蓝图相同的 UI 组件。 这套崭新的界面现在已经出现在多个位置:

  • 开发者工具中的“服务”标签页。
  • 自动化 UI 编辑器中的服务调用。
  • 脚本 UI 编辑器中的服务调用。
  • 支持调用动作的 Lovelace 卡片中。

目前还不是所有服务调用都已经切换到这个漂亮的新界面,因为各个集成的服务描述还需要逐步适配。 不过,常用服务已经都完成迁移了。如果你还是喜欢写 YAML?没问题,经典的 YAML 模式也依然保留!

建议区域

区域在 Home Assistant 中正变得越来越有用,而这次发布又进一步推动了它的实际应用!

最近,我们不仅可以把设备分配到区域,也可以把实体分配到区域。而现在,集成甚至可以主动建议区域了!

这意味着,如果某个集成知道设备所在的区域、房间或位置,而该设备当前还没有归属区域, 它就可以主动给出建议。比如 Hue 集成现在就能根据设备所在的 Hue 分组来建议区域。

从这次发布开始,以下集成已经支持建议区域:

风扇 speeds: 100%

风扇模型迎来了一次全面升级!现在风扇使用百分比速度,而不再是原来的 lowmidhighoff。这让 Home Assistant 能更好地兼容更多风扇品牌,以及 HomeKit 之类的第三方助手。

不用担心,一切都做了向后兼容处理。

Screenshot of 自动化 editor, showing the % 风扇 speeds! Screenshot of 自动化 editor, showing the % 风扇 speeds!

你有没有注意到上面的截图里,自动化编辑器现在更宽了? 我们调整了布局,让你在创建自动化时能拥有更大的操作空间。

Z-Wave JS 更新

这次发布中,Z-Wave JS 团队同样非常忙碌。新增了好几个新功能,也修复了许多 Bug。下面是简要总结。

我们在 Z-Wave JS 服务器中引入了协议架构版本机制,让旧客户端也能连接并与较新的服务器通信,从而避免未来出现兼容性问题!

Home Assistant 核心 2021.3.0 will require Z-Wave JS server 版本 1.1.0. If you're using the official Home Assistant add-on, the 集成 will automatically 更新 the add-on if an older add-on and server 版本 is encountered. Magic! If you're not using the Home Assistant add-on to run the server you will need to 更新 the server before updating Home Assistant 核心.

You can now automate and change the 配置 设置 of your 设备 with the zwave_js.set_config_parameter 服务 and create 自动化 using the new zwave_js.refresh_value 服务, to 更新 a 设备 that doesn't automatically refresh itself.

But there is more!

  • Garage doors (barrier) and similar 遮盖 can now be controlled.
  • Some heating valves and similar 设备 that can be set to multiple different values will now show up as number 实体.

Flexible & variable 自动化 触发器

现在,我们已经支持在自动化触发器中使用变量和(受限的)模板了!比如在为基于 MQTT 的自动化编写蓝图时,这会非常有用。

automation:
  trigger_variables:
    room: "living_room"
    node: "ac"
    value: "on"
  trigger:
    - platform: mqtt
      topic: ""
      payload: ""

正如前面简要提到的,触发器模板和变量可用的模板语法会更受限制;更多信息请参阅 受限模板 文档。

Supervisor 面板中的翻译

除非你住在北欧,不然这个标题大概看不太懂。它是挪威语,意思是“Supervisor 面板中的翻译”。没错!我们现在已经为 Supervisor 面板加入了翻译支持。🎉

如果你想帮助把这些内容翻译成自己的母语,欢迎加入前端团队在 Localize 上的翻译工作

但我们并没有止步于此!现在,插件也可以为前端中显示的配置选项和网络描述提供 翻译文件

这还不够?你还想要更多?那就继续!

  • The communication between the 前端 and the 后端 now relies on WebSockets, which allows the Supervisor to notify the 前端 about changes.
  • For add-on authors, you can now use YAML instead of JSON for your add-ons 配置 files.
  • New 更新 dialog that will ask you to take a snapshot before you 升级 核心/add-ons.
  • Better hardware support to 遮盖 more 设备.
  • Passwords and secrets in add-on configurations are checked against known breaches with https://haveibeenpwned.com/

Screenshot of the new 更新 dialog that asks for creating a snapshot Screenshot of the new 更新 dialog that asks for creating a snapshot.

其他值得注意的变化

这次发布还有更多精彩内容;下面是一些其他值得关注的变化:

  • Shelly now supports battery-operated 设备, thanks to @thecode!
  • You can now use the color homeassistant as a color_name in your 灯光 服务 calls, just because we can 😎
  • @emontnemery, added support for using alias to virtually any step in 脚本/自动化. This is really helpful when debugging and documents your sequences as well, as it annotates each step.
  • @emontnemery didn't stop there, he also added support for enabling/disabling 集成 配置 entries! So you can, e.g., temporarily disable a whole 集成.

Screenshot of disabling an 集成 entry Screenshot of disabling an 集成 entry.

  • Thanks to @Nixon506E, you can now set a transition time when activate Hue 场景.
  • In the tab of the 开发者工具, there is now a small copy to clipboard button with each 实体. Thanks, @KTibow!
  • @postlund added support for repeat, shuffle and volume stepping to the media player 集成 of the Apple TV 集成.
  • @larena1 reduced the amount of rendering history charts cause, so that will speed things up! Thanks!
  • We now have a select selector! Great for adding dropdown choices to Blueprints, thanks @EPMatt!
  • @raman325 extended the Universal Media Player with a lot of new capabilities.
  • When adding a new 集成, the UI will now show discovered 设备 for that 集成 as well! Thanks, @bramkragten!
  • We updated CodeMirror to the latest 版本, which provided the YAML code editors in our UI. It should now be better, faster and has improved support for mobile 设备.

新集成

我们欢迎以下新集成加入这次发布:

新平台

以下集成新增了平台支持:

现已支持通过 UI 设置的集成

以下集成现已可通过 Home Assistant UI 进行设置:

发布 2021.3.1 - March 5

发布 2021.3.2 - March 5

发布 2021.3.3 - March 8

发布 2021.3.4 - March 12

If you need help...

如果你需要帮助,欢迎前往我们非常活跃的 论坛,或加入我们的 Discord 聊天

如果这次发布带来了问题,请到我们的 问题追踪器 提交反馈,并确保完整填写 issue 模板中的所有字段。

Backward-incompatible changes

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.

Custom 集成 now require a version key in their manifest file, this also means that all custom 集成 now require a manifest file.

If you are using a legacy custom 集成 like custom_components/awesome.py this now needs to move to custom_components/awesome/__init__.py so you can add custom_components/awesome/manifest.json to it.

更多信息 about 集成, manifests have a look here: https://开发者.home-assistant.io/docs/creating_integration_manifest

For now, this will create a 警告 on startup. But this will eventually be blocked from loading if it's missing a 版本 in the manifest.

If you see these 警告, please report the issue with the author of that custom 集成.

(@ludeeus - #45919)

The 风扇 实体 model has changed to split named speeds into percentages in the range from 0 (off)-100 and preset modes.

Why change?

This change allowed us to expand the number of supported speeds to accommodate additional 风扇 models in Home Assistant.

We had 3 风扇 speeds and that worked great as long as the 风扇 had no more than 3 speeds.

Over time we received a number of requests to add 风扇 with 4, 5, or even more speeds and preset modes. This put us in the difficult position of having to reject this support because the underlying 风扇 model didn’t support it.

Percentages were chosen because they can represent up to 100 speeds which should accommodate all 风扇. Additionally, it’s a lot easier to ask your voice assistant to set the 风扇 to 20% then remember that medium-low is actually low-medium or have to learn and remember how to say the speeds for every 风扇 model you want to control.

What to change?

Calls in 自动化 and 脚本 to fan.set_speed should be replaced:

  • Calls that set a speed should use fan.set_percentage.
  • Calls that set a preset mode should use fan.set_preset_mode.

The following speeds existed in 核心 集成 and will now be automatically identified as preset modes: auto, smart, interval, idle, and favorite.

Both of the new calls are backward compatible.

Calls in 自动化 and 脚本 to fan.turn_on that use the speed 属性 should be switched to use the percentage or preset_mode 属性 once the underlying 集成 has been updated to support it.

All 核心 风扇 have been updated to ensure that calls to the fan.turn_on 服务 map percentage or preset_mode to speed for backwards compatibility.

(@bdraco - #45407) (风扇 docs)

Template 风扇 have been updated for the new 实体 model that uses a percentage for the speed.

The following 配置 options have been deprecated: speed_template, set_speed, and speeds.

The replacement options are percentage_template and set_percentage. There is no replacement for speeds since the percentage is always from 1-100 along with 0 for off.

(@bdraco - #45478) (template docs)

Hyperion has fully transitioned to 配置 via UI. YAML 配置 has been removed. Existing YAML 配置 has already been imported automatically in the previous releases and can now safely be removed from your 配置 files.

(@dermotduffy - #45690) (hyperion docs)

The Nuki 集成 is now configurable via the UI. The YAML 配置 is now deprecated.

You existing YAML 配置 will be automatically imported on 升级 and can be safely removed from your YAML 配置 after upgrading.

(@pree - #45664) (nuki docs)

For CalDAV custom calendars, now only matching events are shown in the calendar 前端, instead of all events for this calendar.

Although, this is technically a bugfix, if you didn't notice it before, it might now surprise you.

(@inytar - #45701) (caldav docs)

All CPU-related 传感器 were named with "Load" which is not correct because there is a difference between CPU load average and CPU utilization.

Units have been corrected.

Any 自动化 that consumes this data may need to be updated.

(@mib1185 - #45500)

If discovery is used the 实体 will get a new entity_id derived from the hostname of the soundbar. This means the entity_id can not be changed anymore since there is currently no way to get a unique_id from the 设备.

(@bernimoses - #42044) (lg_soundbar docs)

MySensors has fully transitioned to 配置 via UI. Existing YAML 配置 is automatically migrated and imported, and can now safely be removed from your 配置 files after upgrading.

No changes to YAML are applied after the migration has happened. If you need to change anything, use the 前端.

(@functionpointer - #45421) (mysensors docs)

MQTT 遮盖 value_template is deprecated to use for extracting position, support will be removed in Home Assistant 核心 2021.6.

Instead of using value_template, position_template should be used.

MQTT 遮盖 tilt_invert_state is deprecated, instead tilt_min and tilt_max should be used. Support for tilt_invert_state will be removed in Home Assistant 核心 2021.6.

(@thecode - #46059) (MQTT docs)

Removes the internal stream components record 服务.

This 服务 is meant to be used internally only by camera so this is not expected to be a problem in practice as you should be using camera.record instead.

(@allenporter - #45431) (摄像头 docs) (generic docs) (nest docs) (stream docs)

The HTTP base_url URL setting was marked deprecated in Home Assistant 核心 0.110 and replaced by the new internal & external URL 设置 that are available in the UI.

This 发布 removes the fallback logic to the old base_url setting. If you still have an base_url configured in the HTTP section of your YAML 配置, please remove it.

(@frenck - #46316)

The MQTT 灯光 with template schema will now send a float instead of an int with the transition key.

灯光 that require an int instead of a float can 恢复 the original functionality by using the following in the template for specifying the transition:

(@kangaroomadman - #46385) (MQTT docs)

配置 via YAML is now deprecated and you existing YAML 配置 will be automatically imported into the UI on first run. If your TV is not running on first start, you will need to complete the 配置 from 集成 screen once your TV us online.

The previous turn_on_action will not be imported, and must be re-创建 as a 设备 触发器 自动化.

(@elupus - #45784) (philips_js docs)

The legacy 设备 tracker DeviceScanner was replaced with the new 设备 tracker implementation ScannerEntity.

You should remove references to platform asuswrt in device_tracker section in your YAML 配置 and 更新 person 设备 tracker with the new 实体.

The YAML key dnsmasq, interface and require_ip now are managed as 集成 options. The values present in YAML are imported in the options the first time that the 集成 is loaded.

All 传感器 are initially 创建 as disabled and can be enabled from ASUSWRT 设备 配置 instead of using YAML 配置.

(@ollo69 - #46468) (asuswrt docs)

Keenetic NDMS2 Routers are now configured and managed from the UI. Existing YAML 配置 will be automatically imported and can be safely removed after upgrading.

The upgraded platform also adds:

  • 实体 and 设备 manageable from UI.
  • 二元sensor for router connection status.
  • Support for monitoring multiple interfaces.

(@foxel - #38353) (keenetic_ndms2 docs)

If an 自动化 触发器 template already renders as true on Home Assistant 核心 startup, it will no longer 触发器 at startup. This bug fix prevents unintended 触发器 of 自动化 as startup, but might cause a different behavior than before.

(@amelchio - #46423) (template docs)

脚本 and 自动化 are now more careful about reporting problems with 条件. For example, a state 条件 that references an unavailable 实体 will 日志 a message 警告 about the problem. Depending on the circumstances when such 错误 happen, the flow of the 自动化 (i.e., stop/continue) might end up different from before.

(@amelchio - #46838) (自动化 docs) (homeassistant docs)

Xiaomi Miio 开关, and 吸尘器 platforms should now be set up using the UI, please remove the old YAML 配置 from your 配置 file.

They are now automatically discovered, if not, click 配置 in the 侧边栏, then click 集成 and then click the + icon in the lower right and find Xiaomi Miio.

Or click:

Select the option “Connect to a Xiaomi Miio 设备” and click submit, follow the 设置 instructions.

(@starkillerOG - #46179 #46669) (xiaomi_miio docs)

HomeKit pairings and accessory IDs from Home Assistant 核心 版本 0.109 and earlier are no longer migrated on 升级.

Users upgrading directly to 2021.3 from 0.109 and older should 升级 to 2021.2 first if they wish to preserve HomeKit 配置 and avoid re-pairing the bridge.

This change does not affect upgrades from 0.110 and later.

(@bdraco - #46616) (homekit docs)

Requests for closing/opening 遮盖 fully from Google Assistant will now use close/open 服务 instead of set_postion 服务. This a a revert of an unexpected breaking change.

(@elupus - #46602) (google_assistant docs)

Habitica has fully transitioned to 配置 via UI. Existing YAML 配置 is automatically migrated and imported, and can now safely be removed from your 配置 files after upgrading.

(@leikoilja - #38910) (habitica docs)

SSDP searches now binds to 0.0.0.0 instead of each interface separately. Everything was still discovered in testing on a server with multiple interfaces.

(@bdraco - #46554) (ssdp docs)

Minimum required zwave-js-server 版本 is now 1.1.0. You need to run this server 版本 at mimimum for the 集成 to work.

(@marcelveldt - #46983) (zwave_js docs)

Support for bond 设备 with up and down 灯光 has been added. Previously, if the 设备 had two 灯光, only a single 灯光 实体 would be 创建 that would not function properly. The functional 灯光 实体 will need to be manually removed.

(@bdraco - #46233) (bond docs)

Weather 实体: Renamed expose_sensors to create_sensors to prevent confusion with the KNX expose_sensor function.

(@farmio - #46809) (knx docs)

To support user equipment that requires the entry of a usercode in addition to username and password, now all users must 配置 a usercode.

This can be done by updating the 集成 in the User Interface via 配置 > integrations.

The use of YAML 配置 is no longer supported.

(@austinmroczek - #39199) (totalconnect docs)

Polling interval of 15 seconds causes high load on Tado servers and does not provide enough value to warrant it. Tado plans to introduce a rate limit to prevent such misuse of the API, therefore the polling interval needs to be increased to make sure the 集成 works well in the future.

(@macrosak - #46915) (tado docs)

LiteJet is now configured via the UI. Existing YAML configurations will automatically be imported and can be removed after completing the 升级.

LiteJet's include_switches YAML option has been removed. 开关 can be enabled via the 集成's 实体 list in the UI.

LiteJet's exclude_names YAML option has been removed. Undesired 实体 can be disabled via the 集成's 实体 list in the UI.

(@joncar - #44409) (litejet docs)

The nest FAN_ON mode now sets the 设备 timer to use the max duration of 12 hours, rather than the default of 15 minutes. If you would like the 风扇 to 关闭 sooner may use an 自动化 with timer to set FAN_OFF sooner.

(@allenporter - #46489) (nest docs)

The methods of storing secrets in credstash and keyring have been removed. They have been deprecated and a 警告 has been printed since Home Assistant 核心 2020.12.

(@balloob - #47033)

Hue groups are now disabled by default because they do not have a unique ID. Existing configurations that have previously saved Hue options are not affected.

To enable Hue groups:

  • Browse to your Home Assistant instance
  • In the 侧边栏 click on
  • From the 配置 menu select
  • Find the entry for the Hue Bridge
  • Select Options and change the setting

(@bdraco - #47067) (hue docs)

Farewell to the following

The following 集成 are no longer available as of this 发布:

  • CoinMarketCap has been removed, the used API has been out of 服务 for a long time already. (@frenck - #46615)
  • Crime Reports has been removed, as the API is no longer available. (@frenck - #46312)
  • Nuimo was in a non working 状态 for a long time now. (@rngtng - #45600)
  • Synology has been removed, the Synology DSM 集成 provides a full replacement. (@thecode - #46482)
  • xFinity Was previously marked deprecated. It relies on web scraping to function, which is no longer allowed. (@thecode - #46484)

All changes