File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -189,6 +189,37 @@ actions:
189189 data : {}
190190` ` `
191191
192+ ### Battery Low daily summary
193+
194+ If you want a single message sent to your email or other notification service you can use the Check battery low action response to build a summary.
195+
196+ ` ` ` yaml
197+ alias : Battery Notes - Low Battery Summary
198+ description : Send a single summary of all low batteries daily
199+ triggers :
200+ - trigger : time
201+ at : " 09:00:00"
202+ conditions : []
203+ actions :
204+ - action : battery_notes.check_battery_low
205+ metadata : {}
206+ data :
207+ raise_events : false
208+ response_variable : battery_check
209+ - variables :
210+ battery_summary_message : |
211+ {%- for item in battery_check.check_battery_battery_low | sort(attribute='battery_level') %}
212+ • {{ item.device_name }} - {{ item.battery_level }}% - {{ item.battery_quantity }}× {{ item.battery_type }}
213+ {%- endfor %}
214+ - action : notify.send_email
215+ metadata : {}
216+ data :
217+ message : " {{ battery_summary_message }}"
218+ title : Low battery summary report
219+ target : you@youremail.com
220+ mode : single
221+ ` ` `
222+
192223### Battery Replaced
193224
194225Mark a battery as replaced when there is an increase in battery level.
You can’t perform that action at this time.
0 commit comments