0.106:灯光亮度步进、更好的安全模式与人物对话框

你好呀,Home Assistant Core 0.106!很高兴见到你 😃

这是一次很棒的发布,提升了稳定性、可靠性,并带来了许多贴心的新功能,让整体体验更加友好、更加容易使用。让我们开始吧!

安全模式改进

在 Home Assistant 0.105 中,我们引入了安全模式。我们的目标是,无论发生什么情况,都尽量确保 Home Assistant 能启动起来,并给你一个可操作的界面。

@balloob 在这个版本中继续大幅改进了这项功能。现在,即便核心系统出现问题,甚至 Lovelace 配置无法读取,Home Assistant 也更有能力撑过去。此外,安全模式的展示方式也做了调整,让你能立刻看出自己正处于安全模式:

Screenshot of Home Assistant running in Safe Mode Home Assistant 运行在安全模式时的截图。

灯光亮度步进调节

你有没有试过做一个自动化来调亮或调暗灯光?或者把遥控器接进来,用它控制灯光亮度? 如果试过,你大概知道这件事以前做起来有多麻烦,往往还得额外写不少模板才能实现。

这个版本让这一切简单多了。下面是一个设备自动化示例:

Screenshot of a 设备 自动化 with dimming 灯光 带调光灯光的设备自动化截图。

我们也把这项功能加入到了 light.turn_on 服务中。现在你可以基于当前亮度, 通过 brightness_step(-255 到 255)和 brightness_step_pct(-100 到 100)参数来调整亮度。

有一点值得注意:当亮度降到 0 时,灯光会被关闭;如果灯光当前已关闭,而你把亮度往上调,它就会被打开。 这非常实用,因为如果你手上有一个旋钮式调光按钮(例如 IKEA SYMFONISK),你就可以直接通过旋转来调节亮度,甚至仅靠旋转就能完成开灯和关灯。

人物更多信息对话框改进

人物现在拥有全新的更多信息对话框。它会在地图上显示该人物所在的位置;如果此人当前不在任何区域中,你还可以一键用他的当前位置创建一个区域。

Screenshot of the new more info for a person 人物新版更多信息对话框截图。

实体配置面板现在会显示所有实体

此前,实体配置面板只会显示那些能被 Home Assistant 唯一识别的实体(也就是拥有所谓 unique ID 的实体)。但并不是所有集成都能提供这个信息,因此实体面板看不到全部实体,容易让人困惑。

从这个版本开始,我们把所有实体都纳入了这个面板中,让你能完整总览系统内的全部可用实体。虽然不是所有实体都能编辑,因为这需要实体具备唯一标识;如果某个实体没有 unique ID,铅笔图标上就会显示斜杠。

Screenshot of uneditable 实体 in the 配置 面板 配置面板中不可编辑实体的截图。

由于现在所有实体都会出现在这个面板里,它不仅能为你提供一个清晰完整的总览;你还可以利用 0.105 中引入的“相关项”功能,查看这些实体被用在了哪里!

开发者工具面板更新

开发者工具面板也迎来了一些贴心的小改进。在“信息”标签页中,你现在可以看到一份自己正在使用的全部集成列表,日志也开始能够识别对应的集成了。

这两个地方现在都带上了文档和 GitHub issue 跟踪器的链接,让你在遇到集成问题时可以更快深入排查。

Screenshot of the 集成 list and an example 日志 message 集成列表与示例日志消息截图。

传感器卡片

我们的传感器卡片迎来了样式更新。最初这个设计借鉴自 Lovelace Mini Graph 卡片,而现在它也同步更新,以匹配那张卡片改进后的新外观。

Screenshot of the updated 传感器 卡片 更新后的传感器卡片截图。

其他值得注意的变更

别急……还有更多!下面是这个版本里一些其他值得一提的小改动:

  • 在上个版本引入的区域编辑器中,你现在已经可以修改“家”区域的位置了。虽然“家”区域的半径目前还不能调整(我们会继续完善!),但你已经可以在地图上拖动它。

  • 同样是对上个版本功能的延伸,state_color 选项现在也可用于其他卡片,因此你可以覆盖卡片的默认行为。

  • 新建自动化时,现在默认会使用设备自动化,而不是状态触发器和服务调用。设备自动化在 UI 中创建起来更简单也更清晰。当然,你依然可以像以前一样继续使用旧式触发器和动作。

  • 在自动生成的 Lovelace 中,我们不再默认加入自动化和电池实体。你可以在自动化配置面板中找到自动化,而电池实体则可以在设备配置页面中查看。 如果你仍然希望在 Lovelace UI 中显示自动化和/或电池实体,也可以随时手动把它们加回来。

  • 脚本和场景现在都支持设置自定义图标。以前你必须通过 customization 才能做到这点,现在直接在配置中设置即可。

    scene:
      - name: Movies
        icon: mdi:movie-open
        entities:
          light.tv_back_light:
            state: on
            brightness: 125
          light.ceiling: off

自定义卡片

如果你是某张很棒的 Lovelace 自定义卡片的作者,

那请注意:我们对 Lovelace 做了一些可能会影响自定义卡片的调整,务必阅读开发者网站上的这篇博客文章

新集成

新平台

如果你需要帮助……

欢迎前往我们非常活跃的 论坛,或者加入 聊天频道

如果这个版本带来了问题,请到我们的 issue tracker 提交报告,并尽量完整填写 issue 模板中的所有字段。

不向后兼容的变更

  • Tesla - Tesla default scan interval has been raised to 660 seconds from 300 seconds. This is the result of new testing showing the prior default would not allow Tesla vehicles to fall asleep. You should reevaluate your scan interval if you have changed it, to avoid battery drain. The scan interval has had the minimum lowered to 60. - (@alandtse - #31194) (tesla docs)

  • Insteon - The Insteon 实体 设备 状态 属性 were changed to conform to naming standards. Insteon Address is now insteon_address and Insteon Group is now insteon_group. You may need to 更新 自动化 and 脚本 that rely on these 属性. - (@teharris1 - #31183) (insteon docs)

  • AVM FRITZ!DECT (Removed) - FRITZ!Dect is being removed and you should use the FRITZ!Box 集成 instead, which offers more features. - (@escoand - #31359) ([fritzbox docs])

    Example YAML 配置:

    switch:
      - platform: fritzdect
        username: YOUR_USERNAME
        password: YOUR_PASSWORD

    should change to

    fritzbox:
    devices:
      - host: fritz.box
        username: YOUR_USERNAME
        password: YOUR_PASSWORD
  • Danfoss Air - The names of some danfoss_air 传感器 include a misspelling of the word Danfoss. This typo has been corrected and you will need to adjust all occurrences respectively. - (@KasperLK - #31344) (danfoss_air docs)

    The following 传感器 are affected:

    • dandoss_air_dial_battery -> danfoss_air_dial_battery
    • dandoss_air_exhaust_fan_speed -> danfoss_air_exhaust_fan_speed
    • dandoss_air_supply_fan_speed -> danfoss_air_supply_fan_speed
  • Météo-France - Météo-France now supports the 配置 flow and is now available to be added as an 集成 from the 集成 UI! There are no more monitored_conditions and all 传感器 will be added automatically. - (@Quentame - #29927) (meteo_france docs)

  • Glances - Glances 传感器 are now dynamically added, which results in 实体 having new names, in particular 传感器 for mounted disks and temperature. You will need to remove the existing 配置 and re-add it, and adjust for any 自动化 you have using the new 实体 names. - (@engrbm87 - #28639) (glances docs)

  • 服务 Calls - 服务 calls that reference non-existing 实体 will now 日志 a 警告 instead of silently being omitted. If you are using a 模板 and want to select no 实体, you need to pass none instead. The TTS 集成 will no longer target all media players if no 实体 ID passed in. You need to specify all instead. - (@balloob - #31427)

  • 灯光 - It is no longer allowed to pass both brightness and brightness_pct to light.turn_on 服务. Previously passing both would have used brightness_pct. - (@balloob - #31452) (灯光 docs)

  • DSMR - Added Belgian meter. Some DSMR 传感器 have been renamed to align with DSMR specifications. "Power" 传感器 are now properly "Energy" 传感器 and those which were previously using "low" and "normal" descriptions now use "tarif 1" and "tarif 2", respectively. - (@dupondje - #30121) (dsmr docs)

    Example of 传感器 changes:

    • Power Consumption (low) -> Energy Consumption (tarif 1)
    • Power Consumption (normal) -> Energy Consumption (tarif 2)
  • Orange Livebox Play TV - The Orange Livebox Play TV 集成 has been removed. A change to the site scraped with 此integrations has changed, causing the 集成 to break. 此integrations violated our design decisions and is therefore removed. - (@frenck - #31525) (breaking change)

  • 核心 - Only administrator 用户 can stop or 重启 Home Assistant. - (@balloob - #31509) (homeassistant docs)

  • Sure Petcare - Sure Petcare supports new features and has improved existing features. As a result, you will want to note that the format of the feeders/flaps/pets options changed from a map (id/name) to a simple list of IDs, which means the name option is removed. The name is now gathered directly from the Sure Petcare API but changeable via the HA UI.

    The household_id (which is no longer needed) and customizing options icon and device_class are also removed but can still be configured via the UI. - (@benleb - #31437) (surepetcare docs)

    Example YAML 配置:

    surepetcare:
      username: YOUR_SURE_PETCARE_LOGIN
      password: YOUR_SURE_PETCARE_PASSWORD
      feeders: [12345, 67890]
      flaps: [13579]
      pets: [24680]
  • 前端 - frontend.set_theme and frontend.reload_themes now require admin access. This will not break 自动化 that set themes because those are run with admin access. Also, a themes_updated event no longer contains all theme data. - (@balloob - #31654) (前端 docs)

  • Modbus - The Modbus 二元sensor can now read data from discrete inputs. A new variable input_type was added to define if you want to read from coil or discrete_input. Coil is the default option. - (@vzahradnik - #30004) (modbus docs)

    Example YAML 配置:

    binary_sensor:
      - platform: modbus
        scan_interval: 10
        inputs:
          - name: Sensor1
            hub: hub1
            slave: 1
            address: 100
            input_type: discrete_input
  • Tado - Adding support of multiple Tado accounts has changed the unique ID generation of 传感器 and 温控 设备, and now includes the ID of the home. As a result you will see new 实体 ID's for sensor and climate 设备.

    In addition, support for 热水器 区域 has been added. Tado hot water 区域 with temperature control previously 创建 a 温控 实体, e.g., climate.hot_water, and these will be replaced by a water_heater.hot_water 实体. This change is not breaking for hot water 区域 without temperature control as they do not have a 温控 区域.

    (@gorynychzmey - #31527) (@michaelarnauts - #30095) (tado docs)

    Example YAML 配置:

    tado:
      - username: user1@example.com
        password: !secret tado_pwd1
      - username: user2@example.com
        password: !secret tado_pwd2

    If you have only one account this 配置 will also work:

    tado:
      username: user@example.com
      password: !secret tado_pwd
  • UniFi - Changing tracking 设置 will no longer disable 实体 but will remove them completely from the 状态 machine and 实体 registry. The SSID filter will now mark all wireless clients as not_home if they are connected to SSIDs that are not a part of the filter. - (@Kane610 - #31762) (unifi docs)

  • Rest - Many 设备 continue to use XML for RESTful APIs. This change implements converting XML output to JSON via xmltojson so it can work with the existing rest 传感器 component.

    xmltojson tags may be confusing; if you are not familiar with the conversion, please use the xmltodict tool 创建 by @balloob to identify the tags to be used to parse the resulting JSON.

    As the 属性 that usually need to be scraped are deeper in the document, support for passing in a 模板 to find the JSON 属性 has been added. JSON APIs that do not have their 属性 at the top level can also benefit from this change. - (@bdraco - #31809) (rest docs)

    Example YAML 配置:

    sensor:
      - platform: rest
        resource: http://192.168.1.20/status.xml
        authentication: basic
        username: username
        password: password
        json_attributes:
          - "htstatus"
          - "poolsp"
          - "spasp"
          - "pooltemp"
          - "spatemp"
          - "airtemp"
        json_attributes_path: "$.response.temp"
        value_template: ""
      - platform: rest
        resource: http://192.168.1.5/status.xml
        json_attributes:
          - "led0"
          - "led1"
          - "user0"
          - "temp0"
          - "btn0"
        json_attributes_path: "$.response"
        value_template: "OK"
  • GreenEye Monitor (GEM) - Greeneye Monitor temperature readings are now correct (previously they would report as twice the actual value). If you've compensated for this in your 仪表盘 or displays, you'll need to undo that compensation with this 发布. - (@jkeljo - #31896) (greeneye_monitor docs)

  • Duke Energy - The Duke Energy 集成 has been removed. The website of Duke Energy changed, causing the 集成 to break because it relied on web scraping, which is no longer allowed to be used. - (@frenck - #31921) (breaking change)

  • deCONZ - deCONZ will no longer change 实体 to being disabled when using the 集成 配置 options but rather remove them completely from the 状态 machine. Enabling the option will load all relevant 实体 again. - (@Kane610 - #31661) (deconz docs)

  • Ring - All Ring accounts require two-factor 认证. This means that it is no longer possible to 配置 it via YAML as this cannot support 2FA. - (@balloob - #32039) (ring docs) (breaking change) (beta fix)

  • Hue - The filename option from the Hue bridge 配置 has been deprecated in 0.104 and now removed. - (@frenck - #32027) (hue docs) (breaking change) (beta fix)

Beta Fixes

发布 0.106.1 - February 27

发布 0.106.2 - February 28

发布 0.106.3 - March 2

Added a Coronavirus 集成 to help monitor the ongoing epidemic. More information here.

发布 0.106.4 - March 2

发布 0.106.5 - March 3

发布 0.106.6 - March 10

All changes