From 1849c5fbcf58543d0d1464ea93b358916fc2a670 Mon Sep 17 00:00:00 2001 From: Andrew Jackson Date: Thu, 21 Nov 2024 15:31:49 +0000 Subject: [PATCH] Update events documentation --- docs/community.md | 8 ++++++++ docs/events.md | 14 +++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/docs/community.md b/docs/community.md index 22264a367..a37b82731 100644 --- a/docs/community.md +++ b/docs/community.md @@ -27,6 +27,10 @@ sort: ### Battery Low Notification Raise a persistent notification when a battery is low, dismiss when it's not low +!!! note + + Battery Threshold events are only raised when the device has a Battery+ entity or a [Battery Low Template](./index.md/#battery_low_template) is added to the Battery Notes configuration. + ```yaml alias: Battery Low Notification description: Battery Low Notification with auto dismiss @@ -111,6 +115,10 @@ mode: single ### Battery Replaced Mark a battery as replaced when there is an increase in battery level. +!!! note + + Battery Increased events are only raised when the device has a Battery+ entity or a [Battery Low Template](./index.md/#battery_low_template) is added to the Battery Notes configuration. + ```yaml alias: Battery Replaced description: Battery Replaced diff --git a/docs/events.md b/docs/events.md index 43e1612b9..b14385d61 100644 --- a/docs/events.md +++ b/docs/events.md @@ -5,10 +5,14 @@ The following events are raised by the integration. These events can be used wit ## Battery Threshold `battery_notes_battery_threshold` -This is fired when any device within Battery Notes has a battery level changed to either below or above the device specific or global threshold. +This is fired when a device within Battery Notes has a battery level changed to either below or above the device specific or global threshold. You can use this to send notifications in your preferred method. An example automation below displays a persistent notification. +!!! note + + Battery Threshold events are only raised when the device has a Battery+ entity or a [Battery Low Template](./index.md/#battery_low_template) is added to the Battery Notes configuration. + | Attribute | Type | Description | |-----------|------|-------------| | `device_id` | `string` | The device id of the device. | @@ -20,7 +24,7 @@ You can use this to send notifications in your preferred method. An example aut | `battery_quantity` | `int` | Battery quantity. | | `battery_level` | `float` | Battery level % of the device. | | `previous_battery_level` | `float` | Previous battery level % of the device. | -| `reminder` | `bool` | Returns true if the event was raised by an action, false if it's from a device event. | +| `reminder` | `bool` | Returns true if the event was raised by an action, false if it's from a device event. | ### Automation Example @@ -74,11 +78,15 @@ mode: queued ## Battery Increased `battery_notes_battery_increased` -This is fired when any device within Battery Notes has a battery level increased above the battery_increase_threshold (default 25%) if not changed within [configuration setting](./configuration.md). +This is fired when a device within Battery Notes has a battery level increased above the battery_increase_threshold (default 25%) if not changed within [configuration setting](./configuration.md). It deliberately does not update the battery_replaced sensor allowing you to choose how you want to handle this. The increase theshold allows for detecting/handling of partially charged batteries rather than just full batteries. An example automation below shows how to update the battery_replaced. +!!! note + + Battery Increased events are only raised when the device has a Battery+ entity or a [Battery Low Template](./index.md/#battery_low_template) is added to the Battery Notes configuration. + | Attribute | Type | Description | |-----------|------|-------------| | `device_id` | `string` | The device id of the device. |