mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
Document flume.list_notifications (#29543)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> Co-authored-by: c0ffeeca7 <k0ffeeka7@gmail.com> Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
bc6ddb2a23
commit
2e27f04615
@ -31,14 +31,50 @@ To add `Flume` to your installation, go to **Settings** -> **Devices & Services*
|
|||||||
|
|
||||||
## Notifications
|
## Notifications
|
||||||
|
|
||||||
Flume notifications are available via binary sensors. To clear the notifications, you will need to use your Flume app or go to: [https://portal.flumewater.com/notifications](https://portal.flumewater.com/notifications) and clear the notification in question.
|
Flume notifications are fetched every 5 minutes and are available via the service `flume.list_notifications`. Some notifications are available via the following binary sensors:
|
||||||
|
|
||||||
The following notifications are supported:
|
|
||||||
|
|
||||||
- Bridge disconnected
|
- Bridge disconnected
|
||||||
- High flow
|
- High flow
|
||||||
- Leak detected
|
- Leak detected
|
||||||
|
- Low battery
|
||||||
|
|
||||||
|
To clear the notifications, you will need to use your Flume app or go to: [https://portal.flumewater.com/notifications](https://portal.flumewater.com/notifications) and clear the notification in question.
|
||||||
|
|
||||||
|
Example of an automation that sends a Home Assistant notification of the most recent usage alert:
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
alias: "Notify: flume"
|
||||||
|
trigger:
|
||||||
|
- platform: time_pattern
|
||||||
|
minutes: /5
|
||||||
|
action:
|
||||||
|
- service: flume.list_notifications
|
||||||
|
data:
|
||||||
|
config_entry: 1234 # replace this with your config entry id
|
||||||
|
response_variable: notifications
|
||||||
|
- if:
|
||||||
|
- condition: template
|
||||||
|
value_template: >-
|
||||||
|
{{ notifications.notifications | selectattr('type', 'equalto', 1) |
|
||||||
|
sort(attribute == ('created_datetime', reverse == true) | length > 0 }}
|
||||||
|
then:
|
||||||
|
- service: 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 }}
|
||||||
|
```
|
||||||
|
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
## Configuration for Binary Sensor
|
## Configuration for Binary Sensor
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user