2021.6:什么都有一点

什么都有一点。这大概是形容这次发布最合适的方式。它内容满满,到处都是各种小而实用的新功能!

Sonos 得到了不少增强,Hue 现在支持推送更新,UI 加入了许多易用性改进,MQTT 新增了不少属性,主题现在也支持模式了……说真的,这个清单我可以一直讲下去。

所以,这次没有那种特别重磅的大功能(也许下个版本正在酝酿中……),但这依然是一场适合所有人的优秀发布。绝对值得你去“All changes”里翻翻自己常用的集成。

../Frenck

支持自定义深色模式主题

以前,所有主题都会自动以我们的浅色主题为基础。现在开始,主题也可以基于默认深色主题来构建了!

不仅如此,@spacegaier 还加入了对“单个主题同时支持深色与浅色模式”的支持! 这样一来,Home Assistant 就能自动为你的自定义主题选择深色或浅色模式。

Screenshot of a custom theme supporting both 灯光 & dark mode Screenshot of a custom theme supporting both 灯光 & dark mode.

如果你是主题开发者,可以在前端文档中了解更多实现方式。

哦,当然,你现有的所有主题也都会像以前一样继续正常工作。

可折叠属性

有些实体会提供很多属性,并显示在用户界面中。大多数时候,你其实并不需要查看它们,而且这些属性里常常包含技术性数据,只会让界面显得更杂乱。

为了让“更多信息”实体对话框更整洁,这些属性现在会默认折叠成一条栏位,选中后才会展开显示。

Screen recording of the collapsible 实体 属性 Screen recording of the collapsible 实体 属性.

时间格式设置

在前几个版本里,我们加入了数字格式选择功能,让你可以决定 Home Assistant 显示数字时使用的格式。很棒吧! 但……时间格式怎么办呢?

这个问题在那次发布时被反复提起,很多人也希望时间格式能拥有同样的自定义能力, 例如偏好使用 24 小时制的人。

那么,这次你可以感谢 @spacegaier

Screenshot of new time format setting Screenshot of new time format setting.

你可以在自己的用户个人资料中找到这项新设置。

为任意集成禁用轮询更新

一个反复被提到的功能请求,是希望许多集成都能提供控制轮询频率的能力。

例如,如果某个集成使用的是按调用付费的 API,而你又不需要过于频繁的更新, 那把轮询频率调低就能帮你节省开销。

另一个常见需求是电池供电设备,或者某些你只希望白天轮询、夜里不轮询的设备。

这次发布中,我们为所有集成都加入了通过系统选项禁用轮询的支持;没错,是所有集成。

Screenshot of the system options of an 集成 showing the disable polling option Screenshot of the system options of an 集成 showing the disable polling option.

等等?禁用轮询?!是的 :)

比如,我们收到过很多不同诉求:有人想调整轮询频率(也就是 scan interval), 也有人希望按固定计划轮询,或者只在其他输入触发时才轮询(例如由运动传感器触发)。

因此,我们决定提供尽可能高的灵活性,来覆盖你能想到的各种用法。禁用轮询后,Home Assistant 会停止自动轮询。不过,你依然可以使用 homeassistant.update_entity 服务 on those 实体 to 触发器 a poll for information.

这意味着,一旦你为某个集成禁用了轮询,就可以通过自动化完全自定义何时轮询该集成。一切都可以基于你自己的时间表、条件或触发器来控制。

网络集成

这次发布加入了一个新的网络集成,由 @bdraco 创建,用来帮助其他 Home Assistant 集成获取与你网络相关的正确信息。

它还为你提供了一个统一位置,用来告诉 Home Assistant 你的网络情况。 这是一个高级功能,因此只有在你的用户资料中启用了高级模式时才会显示。

大多数情况下,你可能并不需要修改这些设置,因为 Home Assistant 默认会自动检测正确配置。 但如果你的网络结构更复杂,比如有多个网卡或 VLAN,现在你就可以手动选择 Home Assistant 集成应使用的接口。

Screenshot of new Home Assistant Network 设置 in the general 配置 Screenshot of new Home Assistant Network 设置 in the general 配置.

请注意,这是一项需要其他集成逐步接入的新功能。目前还不是所有集成都已经会遵循这些设置。

其他值得注意的变化

这次发布还有很多内容;下面是其中一些同样值得关注的变化:

  • 过去几周里,Modbus 从 @janiversen 那里收获了满满的关爱,特别感谢他持续不断地改进这个集成!
  • The Hue 集成 now supports push updates! Blazing fast response times if you are using that platform.
  • @balloob and @bdraco have been working on replacing date/time/timezone handling in Home Assistant. Right on time.
  • All 服务, for all 集成, now have updated information for their 服务 calls. This means all 服务 calls now have a nice new UI. Amazing job @tkdrob!
  • Support for the new colors modes is slowly expanding. This 发布 Elgato, Z-Wave JS, KNX and MQTT have added support.
  • Sonos got some love from @mountainsandcode, @AaronDavidSchneider and @jjlawren. A lot of fixes and improvements, but also added support for controlling the 状态 of the hardware buttons and controlling your Sonos 报警!
  • The developer 状态 tools, now shows the name of the 实体 additional to the 实体 ID. Searching/filtering the list now supports wildcards (*). Thanks, @spacegaier!
  • Thanks to @PeteBa, there is now a recorder.purge_entities 服务 that allows you to purge data from the recorder database for specified 实体.
  • Watson TTS has added a bunch of new voices to choose from, thanks @demikl!
  • Ding dong! @bdraco added support for doorbell buttons to the HomeKit Controller 集成.
  • BMW Connected Drive, now provides a bunch of 传感器 about your last trip. Thanks, @EddyK69!
  • @emericklaw added a new feature that allows you to duplicate a 场景!
  • My Home Assistant now supports linking to the Ingress interface of an add-on!
  • 灯光 templates now have support for effects, transitions and a bunch more properties, thanks to @jacekpaszkowski!
  • VeSync now supports Etekcity 灯光 bulbs, thanks @sdrapha.
  • The universal media player now supports overriding a lot of commands! Thanks for adding that @Drafteed!
  • @mdz continues expanding the SmartTub 集成 adding 服务 to change filtration 设置 and snoozing reminders.
  • The Elgato 集成 now supports the new Elgato LED strips.
  • If you are into Oracle DB, @mciupak made sure our recorder can now use that.
  • Z-Wave JS 集成 now shows progress when adding or re-interviewing a 设备. Thanks, @cgarwood!
  • The Nexia 集成 now also supports controlling American Standard thermostat, added by @bdraco.
  • @Drafteed added support for changing channels on your LG NetCast TV, thanks!
  • @mib1185 ensured that the UX for counters and number helpers look nice!

新集成

欢迎以下新集成加入本次发布:

新平台

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

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

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

发布 2021.6.1 - June 3

发布 2021.6.2 - June 4

发布 2021.6.3 - June 7

发布 2021.6.4 - June 11

发布 2021.6.5 - June 15

发布 2021.6.6 - June 20

如果你需要帮助……

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

如果你遇到了这次发布引入的问题,请到我们的 issue tracker 提交反馈,并确保填写问题模板中的所有字段。

Backward-incompatible changes

This 发布 has an unusual amount of backward-incompatible changes to report. Don't worry, most won't have a noticeable impact and are part of a cleanup effort. However, we do want to report them all, just to be complete and transparent.

集成 that removed deprecated YAML import

The following 集成 had deprecated their YAML import support in the past, and now removed it. Your YAML 配置 has been imported into the UI 配置 in previous releases.

If you still have one of the following 集成 configured in your YAML 配置, you can now safely remove it from your YAML 配置.

集成 that deprecated YAML import

The following 集成 now deprecated importing YAML 配置 into the UI. Your YAML 配置 already has been imported into the UI and the YAML 配置 can be safely removed.

The import functionality for these 集成 will be removed in Home Assistant 核心 2021.8. Using YAML configurations for these 集成 will write a deprecation 警告 in the Home Assistant 日志 files during this deprecation period.

Other backward-incompatible changes

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

Home Assistant will now warn when a misconfigured reverse proxy, or misconfigured Home Assistant instance when using a reverse proxy, has been detected.

These 警告 will become an 错误 in Home Assistant 2021.7.

If you are using a reverse proxy, and see these 警告, please make sure you have configured use_x_forwarded_for and trusted_proxies in your HTTP 集成 配置.

更多信息, see the HTTP integrations 文档.

(@frenck - #51332)

We upgraded our 前端 to use Lit 2.0. During the beta we have noticed some custom 卡片 or views are using LitElement and lit-html from our components.

This is not a recommended practice, and might now cause the custom 卡片 to break this 发布. If you encounter issues with a custom 卡片, please report this issue with the custom 卡片 developer.

Additional information about this change and information for custom 卡片 开发者 on how to 升级 their 卡片, can be found in our developer 博客:

"升级 to Lit 2.0"

As mentioned in every 发布 since 2021.3, custom 集成 will require a 版本 key in their manifest file.

As of this 发布, if that 版本 key is missing in the manifest, the custom 集成 will no longer be loaded.

For more details see our developer 博客 about it

(@ludeeus - #49916)

Support for OWFS has been dropped (obsolete since 0.117).

This part of the implementation did not conform to policy regarding 3rd-party libraries of Home Assistant.

(@epenet - #50121) (onewire docs)

Alexa EqualizerController has been disabled for Denon AVR since it caused Alexa to be unable to discover any 设备.

(@starkillerOG - #49628) (Alexa docs)

Since in most cases, the amount of really wanted to be tracked 设备 is quite lower than the overall count of 设备, device_tracker 实体 will be disabled by default. You need to specifically enable wanted device_tracker, even newly detected 设备.

(@mib1185 - #50791) (fritz docs)

Blebox 灯光 no longer supports the deprecated white_value, use rgbw_color instead.

(@emontnemery - #49562) (blebox docs)

Buienradar is now configurable via the UI and has deprecated support for the YAML 配置. Your existing YAML 配置 will be imported once.

When you have a weather and 传感器 设置 for same coordinates, they will be merged into one 集成 instance. Only one 摄像头 配置 will be imported.

Following things are changed:

  • The forecast key of the weather platform is deprecated, forecast data is fetched in the same API call and to be in line with ADR-0003, all available data is exposed.
  • Weather, 传感器 and 摄像头 domain are 设置 in one 集成. For new entries, 传感器 and 摄像头 实体 are disabled by default.
  • Dimension for 摄像头 images is fixed to 700 pixels.

(@RobBie1221 - #37796) (buienradar docs)

The 集成 library requirement has requirements that are conflicting with requirements of other 集成. The library maintainer hasn't responded to our issues for 10 months.

The 集成 is therefore disabled until the library has been fixed and Home Assistant updated with a new library 版本.

(@MartinHjelmare - #51069) (ee_brightbox docs)

Epson 集成 doesn't allow port set anymore. It uses port 80 and 3629 for communication.

(@pszafer - #45434) (epson docs)

The 12V, AC, and USB 二元sensor are now 开关. You should 更新 any 自动化 and 脚本 that depend on these moved 实体.

Before: binary_sensor.yeti_ac_port_status After: switch.yeti_ac_port_status

(@tkdrob - #48612) (goalzero docs)

HomeKit Controller climate 设备 will change the reported temperature precision for their current_temperature 属性 from whole degrees to 0.1 degree increments when the system is in Fahrenheit mode.

自动化 which assume whole-number reporting precision may need adjustments.

(@jjlawren - #50415) (homekit_controller docs)

The create_temperature_sensors option for 温控 设备 is now deprecated. Please use a template 传感器 instead.

This option 创建 传感器 实体 out of 温控 配置. This will not work anymore when 传感器 实体 are also only generated from 配置.

(@farmio - #49638) (KNX docs)


The create_sensors option for weather 实体 is now deprecated. Please use template 传感器 instead.

This option 创建 传感器 实体 out of weather 配置. This will not work anymore when 传感器 实体 are also only generated from 配置.

(@farmio - #49640) (KNX docs)

The unit of measurement for the Luftdaten pressure 传感器 has been adjusted from pascal (Pa) to hectopascal (hPa). The value is still the same, the unit displayed in Home Assistant was wrong and now corrected.

If you have 自动化 or record data from 此integrations (externally), you might need to adjust to this change.

The old 配置 style for 开关 is no longer supported

# old configuration.yaml:
modbus:
    - name: "mymodbus"
      ....

switches:
    - name: "switch12"
       hub: "mymodbus"

# new configuration.yaml:
modbus:
    - name: "mymodbus"
       ....
       switches:
         - name: "switch1"

The new 配置 style have changed, to secure against illegal configurations:

# before configuration.yaml:
modbus:
    - name: "mymodbus"
      ....
      switches:
          - name: "switch1"
             input_type: "holding"
             verify_state: false

# new configuration.yaml without verify:
modbus:
    - name "mymodbus"
       ....
       switches:
          - name switch1
             write_type: "holding"

# new configuration.yaml with verify:
modbus:
    - name: "mymodbus"
       ....
      switches:
        - name: "switch1"
           write_type: "holding"
           verify:

(@janiversen - #49386) (modbus docs)


scan_interval, if used, in any Modbus platform cannot be lower than 5 seconds. Adjustment is done automatically with a 警告 if needed.

Modbus timeout, if used, is automatically adjusted (with a 警告) to not be higher than lowest scan interval - 1 second.

(@janiversen - #50363) (modbus docs)

Peviously deprecated features of MQTT 遮盖 have been removed:

  • Using value_template to use for extracting position is no longer allowed an 错误 will be raised if this 配置 is used, Instead of using value_template, position_template should be used.
  • tilt_invert_state is removed, instead tilt_min and tilt_max should be used, 错误 will be raised if this is found in 配置.

(@thecode - #50263) (MQTT docs)


If you use MQTT with the CloudMQTT broker 服务 and have not configured a certificate for MQTT, you now need to adjust to the following:

mqtt:
  certificate: auto
  host: ... # all other info

(@balloob - #51112) (MQTT docs)

Network adapter 配置 has moved to the UI. Users that previously used a custom zeroconf interface 配置 may need to adjust the 设置 in the UI.

(@bdraco - #50874) (network docs)

The 设备 associated with Sonos speakers will report a different firmware 版本, switching to the more common formatted 版本 number from now on.

(@jjlawren - #50861) (Sonos docs)

Support for the TensorFlow 集成 is now deprecated on the Home Assistant OS, 受监管模式 & 容器 安装 types.

Support for it will be removed in Home Assistant 2021.7.

The use of the TensorFlow 集成 on the Home Assistant 核心 安装 type, will remain available.

属性 for the Tibber Pulse 传感器 are removed and replaced by separate 传感器.

Additionally the unique ID are changed, which might have caused changes to the 实体 IDs.

You need to to check you 实体 and 自动化 and adjust them to these changes.

(@Danielhiversen - #50418) (tibber docs)

This changes the behavior of turning a bulb when no parameters are defined. Turning on a bulb without additional parameters will now result in a "Last On" 状态 rather than any sort of preset that may have been set in Kasa.

(@gabrialdestruir - #50334) (tplink docs)

The last_reset 状态 属性 of utility_meter 传感器 are now in UTC and stored as a string.

自动化 and 脚本 accessing the last_reset 状态 属性 may need to be updated.

(@emontnemery - #51067 #50851) (utility_meter docs)

Z-Wave JS 灯光 no longer support the deprecated white_value, use rgbw_color instead.

(@emontnemery - #49588) (zwave_js docs)


Users should 更新 zwave-js-server to 1.7.0 or higher. If the official Home Assistant Z-Wave JS add-on is used, add-on 版本 0.1.23 and higher will include zwave-js-server 1.7.0.

(@MartinHjelmare - #51341) (zwave_js docs)

Farewell to the following

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

  • LIFX Legacy has been removed, use the LIFX 集成 instead. (@frenck - #50069)
  • N26 has been removed due to 3rd party API limitations. (@zhulik - #50292)
  • Spot Crime access to their API cannot be gained anymore. (@frenck - #50361)

All changes