0.105:安全模式、页眉与页脚、全新区域编辑器、Garmin、Sighthound

如果你错过了,我们最近决定调整 Home Assistant 中使用的一些命名,详情可以查看这篇博客文章

因此,这就是 Home Assistant Core 0.105 版本!

旧版“状态 UI”现已弃用

2018 年 6 月,我们发布了 Home Assistant 0.72,首次引入了 Lovelace。到了 2019 年 1 月,随着 Home Assistant 0.86 的发布,它正式成为默认用户界面。

这也意味着,Lovelace 作为状态 UI 的替代方案正式推出至今已经超过一年,是时候和旧版状态 UI 说再见了。本次发布将其标记为弃用,并会在 0.107 版本中从 Home Assistant 中彻底移除。

如果你还没有使用 Lovelace,我们建议你现在就切换过去。默认情况下,Lovelace 与旧版状态 UI 的体验已经非常接近,同时还能在你需要时提供更多灵活性。

除此之外,所有与状态 UI 相关的配置选项也一并弃用。请务必阅读不向后兼容的变更,确认你的配置中是否还有需要移除的选项。

安全模式

人都会犯错,配置里打个字母、缩进写错一格,都是很常见的事。但如果配置里出现这样的错误,就可能导致 Home Assistant 完全无法访问,这显然不太友好。你会失去对 Home Assistant 的访问权限,还得通过别的方法层层排查:到底哪里出了问题?

这个版本为 Home Assistant 引入了“安全模式”。如果在启动过程中,Home Assistant 因为某些原因无法正确读取你的配置,它仍然会继续启动,并使用上一次成功启动时保留下来的部分配置内容。

当这种情况发生时,Home Assistant 会以“安全模式”启动。在这个模式下,系统不会加载正常运行所需的内容,但你仍然可以访问 Home Assistant 前端、设置以及插件(例如 VSCode 或 Configurator 插件)。这样你就能修正问题, 然后重启 Home Assistant 再试一次。

Screenshot of Home Assistant started in safe mode Home Assistant 以安全模式启动时的截图。

请注意,这项功能目前还不算完美,而且只有在升级到本次发布后,Home Assistant 至少成功启动过一次的情况下才能生效。

我们相信,这项功能会让 Home Assistant 更稳健、更易用,也能在你犯错时更宽容一些。

全新改版的 Supervisor 面板

还记得以前的 Hass.io 面板吗?随着 Home Assistant 全新命名方案 的推出,它现在已经更名为 Supervisor 面板。

于是 @ludeeus 最近可忙坏了!他把整个 Supervisor 面板都重写了一遍,使其适配我们当前的前端技术栈,还加入了很多非常漂亮的新视觉元素。

感谢 @ludeeus,效果真的太棒了!

Screenshot of the revamped Supervisor 面板 全新改版的 Supervisor 面板截图。

插件上的新图标让插件仪表盘和商店都更醒目了。另外,插件卡片上新增的状态指示也让你更容易发现哪些插件需要升级,或者在浏览插件商店时快速看出哪些已经安装。

请注意,你需要运行 Home Assistant Core 0.105 才能看到这些新图标。

配置面板变更

在这个版本中,我们开始重构配置面板。过去几个版本里,配置区域累积了很多功能,现在是时候把这些内容整理并统一起来了。

在接下来的几个版本中,我们会继续改进,让功能更容易查找,也让不同元素之间的关联更清晰,从而让整体导航体验更顺手。当前版本里,我们已经加入了配置分区、全新的标签页界面,以及一些视觉上的调整。

此外,设备页面也更新了:现在会显示某个设备被哪些自动化、脚本和场景使用,并加入了基于该设备快速创建这些内容的能力。

Screenshot of the new 设备 info page 新版设备信息页面截图。

在实体的更多信息对话框中,我们把设置按钮改成直接打开实体设置对话框,并新增了一个“相关项”标签页! 这样你就可以看到该实体关联了哪些设备、集成、区域、场景、脚本、自动化、实体和分组。

对于在 UI 中创建的场景、脚本和自动化,我们还在更多信息对话框中直接加入了编辑按钮,让你无需再到处寻找就能快速修改。

实体卡片的页眉与页脚

Two new types are added to the 实体 卡片, a header and a footer. At this moment, we have two options for these, an 图像 and 按钮.

It allows you to create some very cool looking 卡片, but also provides you the option to put 按钮 in the bottom of the 卡片. Very useful for 按钮 that activate 场景, for example.

Screenshot of the new header and footer for 实体 卡片 实体卡片新增页眉与页脚的截图。

改进后的区域编辑器

全新的区域编辑器来了!现在你不会再在集成列表里找到区域了,因为它们已经被移动到配置面板中的独立分区。

在这个新编辑器中,你可以通过拖放来移动区域,甚至还能通过拖动圆圈来调整区域大小。

新增区域、删除区域,或者修改区域名称,现在都比以往更容易。

Screenshot of the 区域 editor 区域编辑器的录屏演示。

新编辑器仅适用于通过 UI 创建的区域;在 configuration.yaml 中设置的区域仍然是只读的。 另外,如果你在 YAML 配置中定义了区域,请注意现在name 已成为必填项

额外的好消息是,我们还新增了一个服务:zone.reload。这个服务允许你在不重启 Home Assistant 的情况下重载区域配置。

图标不再根据状态变色

这项变化一开始可能不太明显,但你迟早会注意到它。

除了灯光之外,实体卡片现在不再根据状态变化自动改变图标颜色。

之所以这样做,是因为有人提出希望所有类型的实体在激活时都能变成黄色,而不只是少数几种实体类型。不过那样很快就会失控,就像下面这张截图展示的一样。

Yellow icon color on everything, isn't the solution either 所有东西都变成黄色图标,显然也不是正确答案。

因此,我们默认对除灯光以外的所有实体类型禁用了这一行为。不过,我们同时新增了一个新选项:state_color。 通过这个选项,你可以决定是否恢复旧行为、将其扩展到更多实体类型,甚至连灯光也一起关闭。

其他卡片现在也会为更多域的图标显示激活颜色。

其他 Lovelace 和前端改进

Lovelace 还有很多改进,远不止这里能全部写完,下面是其中一些亮点:

  • 在自动生成模式下,如果某个实体名称以所在区域或分组名称开头,那么显示时会去掉这部分前缀。 例如,如果你有一盏名为“客厅灯光”的灯,且它位于“客厅”区域中,那么它会在标题为“客厅”的卡片里显示为“灯光”。

  • 我们不再在自动生成模式中显示 device_tracker 实体。我们建议你将一个或多个设备追踪器绑定到 person,这样它们会在 UI 中显示出来。

  • 我们为 Lovelace 添加了许多无障碍特性;现在几乎所有内容都可以通过 Tab 键导航。 我们会继续在这方面努力,让有障碍需求的用户也能更好地使用 Home Assistant。

完整变更列表请查看 Lovelace 更新日志。

前端方面还有更多改进:

  • Logbook 面板 is a lot quicker
  • Maps no longer fit 区域, but only 实体
  • ZHA 面板 now supports binding 设备 to groups
  • Ability to add new 区域 on the 设备 page
  • Material Design Icons are updated to v4.8.95
  • A lot, like a really large amount, of bug fixes!

其他消息

这个部分现在清空了,但别难过!原本的“In other news”栏目现在已经拥有自己的独立博客文章, 我们会定期发布:

想看第一期?社区亮点,第一期!

如果你看到过(或者亲手做过)什么使用 Home Assistant 打造的超棒、有趣、独特、惊艳、启发性十足、特别或搞笑的作品,欢迎把你的社区亮点建议发给我们,这样我们就有机会把它收录进下一篇博客文章中。

新集成

新平台

如果你需要帮助……

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

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

不向后兼容的变更

  • Safe Mode - --demo-mode has been removed. A new safe mode has now been introduced, which loads the bare minimum necessary to load the Home Assistant 前端 and allows for managing the 配置. This is not yet perfect. An invalid 核心 配置 can still cause Home Assistant to refuse to start up. (@balloob - #30723) (前端 docs) (http docs) (safe_mode docs)

  • Google Assistant - 实体 exposed to Google Assistant, that have aliases configured (YAML only feature), will now expose the configured name, instead of the first configured alias.

    Because of that, it might be that 实体 that have a name and aliases set for Google Assistant, may show up with a "new" name.

    This mitigates an issue with Google Assistant, which seems to ignore the configured name when aliases are configured. - (@frenck - #30799) (google_assistant docs)

  • Hass.io/Supervisor - The "Hass.io" menu item in the side bar has been renamed to Supervisor. This was done to match the announced re-branding. While not really a breaking change, it still is a change that might cause confusion at first. - (@frenck - #31480)

  • Spotify - Spotify is now available to be added from the 集成 UI! Removing the current Spotify platform and setting up the 集成 from scratch is recommended.

    The 设备 aliases and the spotify.play_playlist 服务, have been removed. Be sure to remove calls to that 服务 from your 自动化.

    If you use the Spotify platform at this moment:

    • Remove the current 配置 from your configuration.yaml file.
    • Remove the .spotify-token-cache file from your 配置 directory. It is no longer used, however, it does contain security credentials.
    • Follow the 文档 on how to set up the new Spotify 集成 from scratch.

    Please note, if you have an existing Spotify Developer Application, you need to edit it. The URL's have changed. Consult the 集成 文档 for the new URL's to use.

    (@frenck - #30717) (spotify docs)

  • Automation Deprecated - The hide_entity 配置 option on an 自动化 is now deprecated and will be removed in Home Assistant 0.107. With Lovelace now being the standard, this option has become obsolete. Please ensure your 自动化 are not using this option. An example of an invalid 配置 is below. - (@frenck - #30799) (自动化 docs)

    Bad 配置 example YAML:

    automation:
      - alias: "Home Automation Gone Wrong"
        hide_entity: true  <-- remove this
        trigger:
          platform: state
          entity_id: all
        action:
          service: light.turn_off
          target:
            entity_id: all
  • Group Deprecated - Group 配置 options, 服务 and 服务 options related to the old 状态 UI are now deprecated and pending for removal in Home Assistant 0.107.0.

    This includes:

    • The view and control 配置 options for a group
    • The group.set_visibility 服务 call
    • The control, visible, and view options on the group.set 服务 call.

    Please ensure your 配置 and 自动化 do not use these anymore. - (@frenck - #30831) (group docs)

  • Weblink Deprecated - The weblink 集成 is now deprecated and pending removal in Home Assistant 0.107.0. 此integrations only works with the old 状态 UI. - (@frenck - #30834)

  • History Graph Deprecated - The history_graph 集成 has been deprecated and pending for removal in Home Assistant 0.107.0. 此integrations was used for the old 状态 UI. Going ahead, please ensure this 配置 option is not used in your 配置. - (@frenck - #30835)

  • Neato - This change adds a neato boundary name to the 状态 if it exists, requiring to potentially 更新 自动化. - (@Olen - #29915) (neato docs)

  • Xiaomi miio (风扇) - This change adjusts some 风扇 speed values according to the Xiaomi app 版本 5.6.34. and therefore, you will need to 更新 anything that utilizes the following 风扇 speed values:

    • Quiet -> Silent
    • Balanced -> Standard
    • Turbo -> Medium
    • Max -> Turbo

    In addition, the hidden 配置 option for the xiaomi_miio 集成 has been removed. (This would only affect 遥控器.) - (@tiagofreire-pt - #30614) (@frenck - #30727) (xiaomi_miio docs)

  • Samsung Smart TV - Samsung Smart TV is now available to be added from the 集成 UI! If you would rather add it manually, please note the new 配置 below. - (@escoand - #28306) (samsungtv docs)

    Example 配置 YAML:

    samsungtv:
      - host: 192.168.12.34
  • Netatmo - Netatmo is now available from the 集成 UI and takes advantage of OAuth2 account linking! There are a good number of changes to note:

    • For 认证, only client id and secret are required, no need to pass your username and 密码 anymore.
    • Public 天气 传感器 are removed and will be added back in a separate PR.
    • 服务 set_schedule now requires the name of the home.
    • Webhooks are removed and will be added back in a separate 更新.
    • 服务 to 切换 the 灯光/set it to auto have been removed until implemented in pyatmo.

    If you have an existing 配置, you will need to remove/更新 that and run the 配置 flow dialogue to get their 传感器/etc, back using the configuration.yaml option.

    (@cgtobi - #29851) (netatmo docs) (new-platform)

    Example 配置 YAML:

    netatmo:
      client_id: your_client_id
      client_secret: your_client_secret
  • Nederlandse Spoorwegen (NS) - The Nederlandse Spoorwegen API and NSAPI have recently changed and this change accommodates for that. The nederlandse_spoorwegen 传感器 now requires a single API token instead of username and 密码 credentials.

    The "RetrieveTripInformationPublic" API ("Public-Travel-Information" product) will be deprecated on 31-01-2020. You MUST create a new API token for the "Reisinformatie" API ("Ns-App" product) and use that one instead.

    (@YarmoM - #30599 #30971) (nederlandse_spoorwegen docs)

    The following platform 属性 are renamed for consistency with time naming:

    • departure_platform becomes departure_platform_planned
    • departure_platform_changed becomes departure_platform_actual
    • arrival_platform becomes arrival_platform_planned
    • arrival_platform_changed becomes arrival_platform_actual

    Example 配置 YAML:

    - platform: nederlandse_spoorwegen
      password: !secret ns_api_key
      routes:
      - name: Rijswijk-Rotterdam
        from: Rsw
        to: Rtd
  • Simplisafe - Many changes here!

    Simplisafe's cloud API anticipates receiving updates all at once, which our method did not do, which and could result in failed updates. This change consolidates all of the 服务 calls into a single admin 服务, and makes set_pin and remove_pin require admin rights.

    It is no longer possible to 配置 scan_interval for the 集成 and a code-defined interval has been set, as there was potential for 用户 setting this too low and possibly ruin the 集成 for everyone.

    Also, the 集成 now makes us of triggered and arming 状态. Control 面板 实体 no longer have an alarm_active 属性.

    (@bachya - #30567, #30909, #31060) (simplisafe docs)

    Example 配置 YAML:

    simplisafe:
      accounts:
        username: !secret ss_username
        password: !secret ss_password
  • Egardia - 二元sensor for the Egardia 集成 were hidden by default, which is no longer the case. This could affect 自动化 that rely on the hidden 状态 属性 of 实体 创建 by 此integrations. - (@frenck - #30728) (egardia docs)

  • Emby - The auto_hide 配置 option has been removed from the Emby platform. Please be sure to remove it from your 配置. - (@frenck - #30729) (emby docs)

  • Fibaro - 实体 from the Fibaro 集成 were hidden in Home Assistant if they were hidden in Fibaro, which is no longer the case. This could affect 自动化 that rely on the hidden 状态 属性 of 实体 创建 by 此integrations. - (@frenck - #30730) (fibaro docs)

  • AVM FRITZ!Box Net Monitor - The 属性 wan_access_type has been removed from fritzbox_netmonitor as the new 版本 of the fritzconnection 集成 no longer exposes it. As a result, the information will no longer be available in the Home Assistant 传感器. - (@basdelfos - #30210) (fritz docs) (fritzbox_netmonitor docs)

  • MQTT Fan - This fixes supported_features for an MQTT 风扇. Setting speed now requires only a speed command topic.

    Before this change, only a speed 状态 topic had to be set to support the setting of a speed. The speed 状态 topic is not taken into account as it just decides if Home Assistant gets feedback for 状态 and speed updates.

    Likewise, setting oscillation now requires only an oscillation command topic. Before this change, only an oscillation 状态 topic had to be set to support the setting of the oscillation. The oscillation 状态 topic is not taken into account as it just decides if Home Assistant gets feedback for 状态 and oscillation 更新.

    (@springstan - #28680) (MQTT docs)

    Example 配置 YAML:

    fan:
      - platform: mqtt
        name: "room2"
        state_topic: "stat/bvent/POWER"
        command_topic: "cmnd/bvent/POWER"
        availability_topic: "tele/bvent/LWT"
        payload_available: "Online"
        payload_not_available: "Offline"
        payload_on: "ON"
        payload_off: "OFF"
        qos: 1
        retain: false
        optimistic: false
  • Vizio SmartCast TV - The Vizio 集成 is now available to be added from the 集成 UI! When adding a soundbar the options are now between tv or speaker in order to align with the 设备 classes defined in the 媒体播放器 component and to add Amazon Alexa and Google Assistant support. If you prefer to enter the 配置 manually make note of the changes below. - (@raman325 - #30653, #30802) (vizio docs)

    Example 配置 YAML:

    vizio:
      - host: IP_ADDRESS
        access_token: AUTH_TOKEN
        device_type: speaker
  • Statistics - If max_age is configured, this change will keep updating the statistics even when none of the observed 实体 change their 状态. That means that after some time, all recorded 状态 are purged and the statistics 传感器 itself changes to 状态 unknown instead of just keeping its old 状态 indefinitely. Also, some 属性 (total, min_age, change, change_rate, mean, stdev) will change to unknown.

    用户 should ensure that any 自动化 that interrogate the statistics 传感器's 状态 and 属性 can handle unknown.

    (@exxamalte - #27372) (statistics docs)

    Example configuration.yaml:

    sensor:
      - platform: statistics
        entity_id: sensor.pulse_counter
        max_age:
          minutes: 10
  • PulseAudio Loopback Revert - The default port was incorrectly changed to 4713, however, the official 文档 状态 that the default port is 4712 for module-cli-protocol which is used in 此integrations. Therefore, the port has been changed back to 4712 and all previously configured 开关 now need to listen to port 4712. - (@springstan - #30939) (pulseaudio_loopback docs)

  • Apple iCloud - account_name is removed from the manual 配置; nothing changes when using the 集成 UI. - (@Quentame - #30898) (icloud docs)

  • Evohome - Honeywell TCC systems that consist of a single thermostat (i.e., non-evohome systems) will now be split into two 温控 实体 instead of one: a) the whole-house 区域 (for target temperature), and b) the location (for Away, Eco modes). Functionality will not be lost, but this will affect 自动化, etc.: the entity_id of these may need changing. - (@zxdavb - #30968) (evohome docs)

  • Sonos - The following Sonos 服务 now need to be called by a 用户 with admin access: sonos.join, sonos.unjoin, sonos.snapshot, sonos.restore. Sonos 服务 now no longer will default to "all" 实体 if no entity_id is passed in. This has been aligned with the other 服务 in Home Assistant. To target all, add entity_id: all. - (@balloob - #30813) (sonos docs)

  • LG webOS Smart TV - After the discovery of some additional commands, the client library now has much better tracking of TV power 状态. As a result of the client library changes, the standby_connection parameter is no longer needed/present (since the relevant behavior can be steered automatically by the client library now) - (@bendavid - #31042) (webostv docs)

  • Zone - If you're using YAML to 配置 区域, specifying a name is now required. - (@balloob - #30774) (区域 docs)

    Example 配置 YAML:

    - name: Hellmouth
      latitude: 0.2133478
      longitude: 6.7242336
      radius: 200
      icon: mdi:fire
  • Openuv - Openuv is now available to be added from the 集成 UI! It is no longer possible to specify monitored 条件 within the OpenUV 集成; all 实体 are added by default. - (@bachya - #31019) (openuv docs)

    Example 配置 yaml:

    openuv:
      api_key: !secret openuv_api_key
  • RainMachine - RainMachine is now available to be added from the 集成 UI! It is no longer possible to specify monitored 条件 within the RainMachine 集成; all 实体 are added by default. Additionally, the zone_run_time parameter is now configured directly within the controller within configuration.yaml. - (@bachya - #31066) (rainmachine docs)

    Example 配置 YAML:

    rainmachine:
      controllers:
        - ip_address: !secret rainmachine_ip_address
          password: !secret rainmachine_password
  • MaryTTS - The codec and locale 配置 changed to the official config keys from MaryTTS. - (@Poeschl - #30805) (marytts docs)

    • en-GB, en-US becomes en_GB,en_US
    • aiff,au,wav becomes AIFF_FILE,AU_FILE, WAVE_FILE

    The MaryTTS network logic has been extracted into an external package and the effects setting has been added.

    Example 配置 YAML:

    tts:
      - platform: marytts
        host: "localhost"
        port: 59125
        codec: "WAVE_FILE"
        voice: "cmu-slt-hsmm"
        language: "en_US"
        effect:
          Volume: "amount:2.0;",
          TractScaler: "amount:1.5;",
          F0Scale: "f0Scale:2.0;",
          F0Add: "f0Add:50.0;",
          Rate: "durScale:1.5;",
          Robot: "amount:100.0;",
          Whisper: "amount:100.0;",
          Stadium: "amount:100.0",
          Chorus: "delay1:466;amp1:0.54;delay2:600;amp2:-0.10;delay3:250;amp3:0.30",
          FIRFilter: "type:3;fc1:500.0;fc2:2000.0",
          JetPilot: ""
  • ZHA remotes - binary_sensor and switch 实体 are not going to be available for some Zigbee "遥控器", but they were not supposed to be available to begin with. - (@Adminiuga - #31146) (zha docs)

    Affected 设备:

    • Centralite 3130 遥控器 dimmer, DeviceType: 0x0001, removes binary_sensor 实体
    • OSRAM LIGTIFY Dimming 开关, DeviceType: 0x0001, removes binary_sensor 实体
    • Securifi Ltd. Penut Plug, DeviceType: 0x0000, removes binary_sensor 实体
    • 45856GE Jasco Products, DeviceType: 0x0103
    • Aqara Model lumi.遥控器.b486opcn01, removes 开关 实体
    • Aqara Model lumi.遥控器.b686opcn01, removes 开关 实体
    • Sercom Corp, SZ-ESW01, removes 开关 实体
  • NMBS - The generated unique_id and entity_id have changed for the live 传感器. If you were using the live 传感器, you will need to 更新 自动化 and 脚本 with the newly generated ids, and you might have to clear old entries from the 实体 registry. - (@thibmaek - #31078) (nmbs docs)

  • MikroTik - MikroTik 集成 can now be added from the 集成 UI! It also supports importing existing 配置 from configuration.yaml (refer to the docs to 更新 your 配置). Now uses the 实体 registry for managing 设备 (known_devices.yaml will not be used anymore), this causes 设备 to be re-discovered. - (@engrbm87 - #27484) (mikrotik docs)

Removed

Hats over your heart for these shuttered 集成. Pour one out for:

  • PostNL Removed - PostNL changed their unofficial API and implemented protection, which breaks the 集成. It has been confirmed through them that there is no workaround and no likely solution any time in the near future, so it is being removed. - (@peternijssen - #30902)

  • Cisco Spark Removed - Cisco Spark has been rebranded to Cisco Webex Teams. Cisco Webex Teams is available as 集成 in Home Assistant, which can be used as a replacement. - (@frenck - #30738)

  • Owlet - Removed - The API that the Owlet component was based on has been deprecated by the vendor. There is no other public API provided by the vendor that the component can be upgraded to use, so the component has been removed. - (@oblogic7 - #31160)

  • Hook Removed - The hook 集成 has been removed due to the shutdown of the connected 服务. All servers that have been providing this 服务 will be turned off on 31 Jan 2020. - (@springstan - #31046)

发布 0.105.1 - February 5

发布 0.105.2 - February 6

发布 0.105.3 - February 10

发布 0.105.4 - February 14

发布 0.105.5 - February 17

Beta Fixes

All changes