35
35
entity_id : input_boolean.garage_door
36
36
state : ' on' # Optional, 'on' is the default value
37
37
repeat : 30
38
- backoff : 1.0 # Optional, default is 1
39
- max_repeat : 120 # Optional, default is 1440
40
- min_repeat : 15 # Optional, default is 1
41
38
can_acknowledge : True # Optional, default is True
42
39
skip_first : True # Optional, false is the default
43
40
notifiers :
@@ -49,12 +46,9 @@ Configuration variables:
49
46
- **name** (*Required*): The friendly name of the alert.
50
47
- **entity_id** (*Required*): The ID of the entity to watch.
51
48
- **state** (*Optional*): The problem condition for the entity.
52
- - **repeat** (*Required*): Number of minutes the notification should be repeated.
53
- - **backoff** (*Optional*): Factor to allow the repeat delay to be dynamically changed.
54
- - **max_repeat** (*Optional*): Maximum possible delay when ` backoff` is used.
55
- - **min_repeat** (*Optional*): Minimum possible delay when `backoff` is used.
49
+ - **repeat** (*Required*): Number of minutes before the notification should be repeated. Can be either a number or a list of numbers.
56
50
- **can_acknowledge** (*Optional*): Allows the alert to be unacknowledgable.
57
- - **skip_first** (*Optional*): Controls whether the notification should be sent immediately.
51
+ - **skip_first** (*Optional*): Controls whether the notification should be sent immediately or after the first delay .
58
52
- **notifiers** (*Required*): List of ` notification` components to use for alerts.
59
53
60
54
In this example, the garage door status (`input_boolean.garage_door`) is
@@ -99,17 +93,29 @@ attribute raises above 15 or the alert is acknowledged on the frontend.
99
93
100
94
# ## {% linkable_title Dynamic Notification Delay Times %}
101
95
102
- In some use cases, you may desire a notification to become either more or less
103
- frequent every time it is sent. The alert component supports this with a
104
- configuration option called `backoff`. This is a factor that the repeat
105
- interval is multiplied by every time the notification is sent. A `backoff`
106
- factor greater than 1 will elongate the delays between notifications.
107
- Similarly, a backoff factor less than 1 will make the notification more
108
- frequent as time goes on. To prevent the notifications from becoming too
109
- freequent or too far apart, the `min_repeat` and `max_repeat` options are used.
110
- By default, the notifications are allowed as frequently as every minute or as
111
- infrequently as one per day.
112
-
113
- If you desire you delays to become incresingly further apart, start with a
114
- ` backoff` factor of 1.5 and adjust to fit your needs. If you desire reducing
115
- delays, start with a factor of 0.75 and tweak as necessary.
96
+ It may be desireable to have the delays between alert notifications dynamically
97
+ change as the alert continues to fire. This can be done by setting the `repeat`
98
+ configuration key to a list of numbers rather than a single number. Altering
99
+ the first example would look like the following.
100
+
101
+ ` ` ` yaml
102
+ # Example configuration.yaml entry
103
+ alert:
104
+ garage_door:
105
+ name: Garage is open
106
+ entity_id: input_boolean.garage_door
107
+ state: 'on' # Optional, 'on' is the default value
108
+ repeat:
109
+ - 15
110
+ - 30
111
+ - 60
112
+ can_acknowledge: True # Optional, default is True
113
+ skip_first: True # Optional, false is the default
114
+ notifiers:
115
+ - ryans_phone
116
+ - kristens_phone
117
+ ` ` `
118
+
119
+ Now, the first message will be sent after a 15 minute delay. The second will be
120
+ sent after a 30 minute delay. A 60 minute delay will fall between every
121
+ following notification.
0 commit comments