Flume

Flume integration集成将 Home Assistant 与您的设备、服务等连接和集成。 [Learn more] 将展示给定设备 ID 的当前 Flume 状态。

Flume 监控您家水表的实时状态。让最终用户能够检测到小漏水情况,获取家庭用水的实时信息,设定用水目标和预算,并在发现可疑的用水活动时接收推送通知。

配置

要将 Flume integration 添加到您的 Home Assistant 实例中,请使用此 My 按钮:

Flume 可以被 Home Assistant 自动发现。如果发现了实例, 它将显示为 已发现。您可以立即进行设置。

手动配置步骤

如果没有自动发现,请不要担心!您可以设置一个 手动集成条目:

您可以在 设置页面 的 “API 访问” 下找到您的客户端 ID 和客户端密钥。

要将 Flume 添加到您的安装中,请在 UI 中转到 设置 -> 设备与服务,点击带有 + 号的按钮,从集成列表中选择 Flume

通知

Flume 通知每 5 分钟获取一次,可以通过 flume.list_notifications 操作获得。一些通知可以通过以下二进制传感器获得:

  • 桥接断开
  • 高流量
  • 检测到泄漏
  • 电池低电

要清除通知,您需要使用您的 Flume 应用程序或访问: https://portal.flumewater.com/notifications 并清除相关通知。

一个发送最新使用警报的 Home Assistant 通知的自动化示例:

alias: "Notify: flume"
triggers:
  - trigger: time_pattern
    minutes: /5
actions:
  - action: flume.list_notifications
    data:
      config_entry: 1234 # 将此替换为您的配置条目 ID
    response_variable: notifications
  - if:
      - condition: template
        value_template: >-
          {{ notifications.notifications | selectattr('type', 'equalto', 1) | 
          sort(attribute == ('created_datetime', reverse == true) | length > 0 }}
    then:
      - action: notify.all
        data:
          message: >-
            {%- set usage_alert == notifications.notifications |
            selectattr('type', 'equalto', 1) |
            sort(attribute == 'created_datetime', reverse == true) | first %}
            {{ usage_alert.message }}
          title: >-
            {%- set usage_alert == notifications.notifications |
            selectattr('type', 'equalto', 1) |
            sort(attribute == 'created_datetime', reverse=true) | first %}
            {{ usage_alert.title }}

二进制传感器的配置

以下 YAML 创建一个二进制传感器。这需要默认传感器成功配置。

# 示例 configuration.yaml 条目
template:
  - binary_sensor:
    - name: "Flume 流量状态"
      state: >-
        {{ states('sensor.flume_sensor') != "0" }}