title: '2023.8:已翻译的服务、事件与通配符!' description: '<a href=''/home-assistant/integrations/版本/2023.8''<img src=''/home-assistant/images/blog/2023-08/social.png'' style=''border: 0;box-shadow: none;''</a。' 还能使用 Assist 调用 OpenAI 的 DALL-E 生成图像,等等!

2023.8:已翻译的服务、事件与通配符!

Home Assistant 核心 2023.8! 🎉

又一个月,又一个精彩的 Home Assistant 发布!在经历了 6 月7 月 两个内容爆满的版本后,这次发布稍微克制一些。 我们很多人也正在享受暑假 🏖️。

这次发布里的几乎每项功能都非常棒,很难只挑一个最爱。翻译体验有了大幅提升, 用户体验更好了;还新增了一个可以捕获遥控器等设备事件的实体;而 Assist 的新能力则再次让人惊艳!

说到 Assist,你看过 语音之年 - 第三章 的博客了吗?或者也可以看看 YouTube 上的直播回放, 里面演示了这些新功能。

这次也新增了一些集成,其中最值得一提的是 Opower! 这个集成可以拉取美国许多公用事业公司的能耗数据。例如,它支持 PG&EComEdBGE 等众多服务商!⚡️ 这对我们的美国朋友来说绝对是个好消息!

Enjoy the 发布!

../Frenck

Don't forget to join our 发布 party live stream on YouTube 2 August 2023, at 12:00 PDT / 21:00 CEST!

已翻译的服务

All 服务 in Home Assistant are now translatable! 🌎

服务 are the 动作 you can call, like turning on a 灯光. This was one of the bigger parts of Home Assistant that still was only available in English. Odd, as the Home Assistant interface can be used in 60+ languages!

In this 发布, translations for these 服务 have been added to drastically improve the experience when English is not your primary language. For example, when you use the Dutch language (as used in the screenshot below), the 服务 to 打开 a 灯光 is now also translated into Dutch.

Screenshot showing the Home Assistant interface in the Dutch language, showcasing the translations for 服务 calls.

A big step forward! Implementing this change has resulted in a substantial increase in the number of translations. They have doubled! 😅

Because of that, translating all 服务 might take some time; however… You can help! You don’t have to be a developer to help with this; you can do this from the comfort of your browser. Check out our 文档 on how to contribute translations.

事件实体登场

Events are signals that are emitted when something happens, for example, when someone presses a physical button like a doorbell or when a button on a remote control is pressed.

If you have ever tried to work with events in Home Assistant, you probably noticed that it was not the easiest thing to do. You need to know the event name, and then you need to know the data that is being sent with it. Before you know it, you'll start fiddling with the 开发者工具 to figure out what is going on.

To make this all easier, we are introducing a new 实体 type in this 发布: The event 实体.

The event 实体 can capture these events in the physical world and makes them available in Home Assistant as an 实体. Take for example, this Hue remote:

Screenshot showing the new event 实体 provided by a Philips Hue remote.

The beauty of the event 实体 is that they can be used like any other 实体 in Home Assistant: They will show up in the UI, can be used directly in the 自动化 editor, and provide historical information in the logbook.

Besides Matter, the event 实体 is also supported by HomeKit 设备, MQTT, and Philips Hue. We expect to see more integrations supporting this new 实体 type soon.

改进 Home Assistant 的首次使用体验

Onboarding is a user's first experience with Home Assistant. The onboarding screens are the first you see, and steps you take when you access Home Assistant for the first time, setting up things like your account and language preferences. The goal is to ensure this process is seamless, which is why we've made improvements to the onboarding experience.

To achieve this, we have implemented a search field on the map during onboarding. Instead of endlessly dragging the pin on the map around, you can now easily search for your location.

Screenshot showing you can now enter your address to quickly find your location on the map.

This is powered by OpenStreetMap ❤️

使用 Assist 将条目加入购物清单

What if you could ask Assist to add items to your Home Assistant shopping list? Well, now you can!

Add milk to my shopping list!

Screenshot showing asking assist to add milk to the shopping list.

In case you are wondering, the shopping list 集成 adds a handy page to your Home Assistant interface to which everyone in your household can add items. It is a great way to keep track of what you need to buy, and now you can add items to it with your voice using Assist!

Screenshot showing the shopping list 集成 in Home Assistant.

To be able to use this feature, you need to have the shopping list 集成 set up, which is as easy as clicking the My Home Assistant button below:

使用 OpenAI 的 DALL-E 生成图像

In the last 发布, we added the ability for 服务 to respond with data, and now we added a 服务 that allows you to generate an image using OpenAI's DALL-E.

All you need is to set up the OpenAI conversation agent 集成 on your instance, and you will get a new 服务: .

Call this 服务 describing the image you'd like the AI to generate, and it will respond with an image URL you can use in your 自动化.

Screenshot showing the new generate image 服务 with DALL-E from OpenAI, asking to generate an image of an astronaut riding a unicorn.

You could, for example, use this to generate an image of a city that matches the weather 条件 outside of your home, let the AI generate an image about the latest news headline to show on your 仪表盘, or maybe generate a fun image of someone putting out garbage on garbage day.

You could even combine it with the wildcard support for sentence 触发器 so you could ask Home Assistant to generate an image using your voice...

句子触发器支持通配符

Sentence 触发器 now support wildcards! This means you can now partially match a sentence, and use the matched part in your 动作. This is what powers the above shopping list feature too, and it can be used for many other things as well.

You could, for example, create a sentence 触发器 that matches when you say:

Play the white album by the Beatles

Using the wildcard support, you can get the album and artist name from the spoken sentence and use those in your 动作. To 触发器 on the above example sentence, you would use the following command in your sentence 触发器:

Screenshot showing an 自动化 that uses a sentence 触发器 that has wildcards in it.

This will make the album and artist available as 触发器 variables that you can use in your 动作; for example, to start playing the music requested.

These wildcards are interesting and open up a lot of possibilities! Read more about sentence 触发器 in our 文档.

JLo realized he could use these wildcards, combined with the new generate image 服务, to let Home Assistant generate an image and show it on his Chrome Cast-enabled 设备 just by using his voice! 😎 You could ask it:

Show me a picture of an astronaut riding a unicorn!

He put this together in an 自动化 blueprint, which you can use to do the same thing in your own Home Assistant instance:

Screenshot showing how the blueprint by JLo looks like in Home Assistant.

Provide the sentence you like to 触发器 on and the media player you want to show the image at, and you're good to go! You can import his blueprint using the My Home Assistant button below:

条件选择器

A new selector is available for use in, for example, blueprints: The 条件 selector.

This selector takes and shows the 条件 part of the 自动化 editor, and allows blueprint creators to use a user-provided 条件 in their blueprinted 自动化 and 脚本.

This blueprint allows one to set a custom 条件 using the new 条件 selector.

其他值得注意的变更

There are many more improvements in this 发布; here are some of the other noteworthy changes this 发布:

  • Tons of performance upgrades again this month (thanks @bdraco), these include a much faster ingress experience when visiting add-on web interfaces. 🚀
  • @emontnemery added filters to many of the 服务 Home Assistant provides, meaning only options relevant to the 实体 you are calling the 服务 on will be shown in the UI. Nice!
  • CO2Signal changed its name to Electricity Maps. The 集成 has been renamed to match that. Thanks, @madsnedergaard!
  • @Lash-L keeps extending the Roborock 集成, adding many new 实体 in this 发布. This includes an 错误 传感器, volume controls, and DnD setting times. Awesome!
  • EZVIZ received a big 更新, adding support for 报警 control 面板, buttons, and select 实体. Thanks @RenierM26!
  • @farmio added support for adding date and date/time 实体 to KNX! Great!
  • The Xiaomi BLE now supports the MiScale (V1 and V2). Thanks, @Ernst79!
  • UniFi Network now has controls to turn an UniFi WLAN on and off and added image 实体 for QR codes for WLAN access. Thanks, @Kane610!

新集成

We welcome the following new 集成 in this 发布:

This 发布 also has a new virtual 集成. Virtual 集成 are stubs that are handled by other (existing) 集成 to help with findability. These are new:

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

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

发布 2023.8.1 - August 4

发布 2023.8.2 - August 11

发布 2023.8.3 - August 18

发布 2023.8.4 - August 24

需要帮助?加入社区!

Home Assistant has a great community of users who are all more than willing to help each other out. So, join us!

Our very active Discord chat server is an excellent place to be at, and don't forget to join our amazing forums.

Found a bug or issue? Please report it in our issue tracker, to get it fixed! Or, check our help page for guidance for more places you can go.

Are you more into email? Sign-up for our Building the Open Home Newsletter to get the latest news about features, things happening in our community and other news about building an Open Home; straight into your inbox.

不向后兼容的变更

Python 3.10 support has previously been deprecated and has now been removed. Home Assistant now requires Python 3.11 to run.

You don't have to do anything if you are using Home Assistant OS, Home Assistant 容器, or Home Assistant 受监管模式 安装 method. In those cases, we handle this all for you.

Your system has been using Python 3.11 for quite some time already.

(@frenck - #97007)

The legacy discovery 集成 has been removed. This only affects the automatic discovery of Enigma2, Yamaha Network Receivers, and Bluesound.

These can still be manually configured as per usual.

Note this is for our very, very old discovery logic. This does not affect the discovery of any other 集成/设备/服务.

If you still have discovery: listed in your YAML 配置, you can safely remove it.

(@frenck - #96856)

The Ecovacs 集成 has been migrated to the new "StateVacuumEntity" under the hood.

The 状态 of the 吸尘器 实体 now report not only on or off, instead cleaning, paused, docked (implicit mean charging), returning (to base), idle and error. Further, the 动作 turn_on (start cleaning), and turn_off (stop cleaning and return to base) were superseded by three single 动作 start, stop and return_to_base.

(@mib1185 - #95920) (文档)

The legacy Works With Nest API is no longer supported. You must manually take 动作 to use the SDM API by removing the Nest 配置 from configuration.yaml and restarting Home Assistant. Then add the Nest 集成 following the instructions. Please review the 文档 for information about which 设备 are supported.

Additionally, as a reminder, the legacy Works With Nest API is shutting down in September 2023.

(@allenporter - #96111) (文档)

It's no longer allowed for an MQTT RGB 灯光 without a brighness_state_topic to report an RGB value of RGB=0,0,0. The reason is that for such 灯光, the 灯光's brightness is derived from the RGB value, and an RGB value of RGB=0,0,0 corresponds to a brightness of 0 which is not allowed.

In case an MQTT RGB 灯光 without a brighness_state_topic reports 0,0,0 for R, G, and B, that 更新 will be ignored.

(@jbouwh - #96286) (文档)


The MQTT 温控 CONF_POWER_STATE_TOPIC and CONF_POWER_STATE_TEMPLATE were deprecated in HA 核心 2023.2.0 and are now removed. Please remove these options from your 配置. The options were not implemented but will break your MQTT 配置 if they are still present in your config.

(@jbouwh - #96771) (文档)


The way MQTT 实体 are named and how 设备 配置 can be shared between discovered 实体 has changed.

Sharing of 设备 配置

Discovered MQTT 实体 can share 设备 配置, meaning one 实体 can include the full 设备 配置, and other 实体 can link to that 设备 by only setting mandatory fields.

The mandatory fields were previously limited to at least one of connection and identifiers, but have now been extended to at least one of connection and identifiers as well as the name.

Naming of MQTT 实体

The naming of MQTT 实体 has been changed to be aligned with the entities naming guidelines:

  • The has_entity_name 实体 will be set to True on all MQTT 实体.
  • This means any MQTT 实体 which is part of a 设备 will automatically have its friendly_name 属性 prefixed with the 设备 name.
  • Unnamed binary_sensor, button, event, number, and sensor 实体 will now be named by their 设备 class instead of being named "MQTT 二元sensor" etc.
  • It's now allowed to set an MQTT 实体's name to None to mark it as the main feature of a 设备.

(@jbouwh - #95159) (文档)

The Dynalite 配置 面板, which previously was on the Home Assistant 侧边栏, has moved. It can now be accessed via the 集成 page in 设置 > 设备 & 服务 > Dynalite > configuration.

(@frenck - #95920) (文档)

The 状态 values of the Reason Ventilation 集成 have been changed to be more consistent with other 集成 and are now lowercase. Additionally, it can now provide translations for the 状态 values in the UI.

This means that the following 状态 values have changed:

  • Off -> off
  • Level1 -> level1
  • Level2 -> level2
  • Level3 -> level3
  • Level4 -> level4
  • Breeze -> breeze
  • Holiday -> holiday

Please 更新 any 自动化 where you are using the 状态 of this Renson 传感器.

If you are a custom 集成 developer and want to learn about breaking changes and new features available for your 集成: Be sure to follow our developer 博客. The following are the most notable for this 发布:

告别以下内容

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

  • Discovery has been removed. This is the old legacy discovery 集成. See the backward-incompatible changes above 更多信息.
    (@frenck - #96856)
  • Mi Flora has been removed. 此集成早已被 Xiaomi BLE 集成 a long time ago and was in a non-functional 状态.
    (@frenck - #96868)
  • Xiaomi Mijia BLE T&H 传感器 has been removed. 此集成早已被 replaced by the Xiaomi BLE 集成 a long time ago and was in a non-functional 状态.
    (@frenck - #96869)

全部变更

Of course, there is a lot more in this 发布. You can find a list of all changes made here: Full changelog for Home Assistant 核心 2023.8