Monthly smart home battery health audit
On the first Monday of each month, get a calm Slack DM with every smart home device that needs new batteries, grouped by room, plus a running spreadsheet of what dies fastest.
On the first Monday of every month at 8am in my local time zone, run a battery health audit of my smart home and give me one tidy heads up instead of seven duplicate alerts. Use a monthly cron trigger.
Step 1. Use Home Assistant's List States to pull the current state of every entity. Filter down to the ones that are actually battery powered. That means anything with a numeric battery_level attribute, or any sensor whose device_class is "battery". This should catch door and window sensors, motion sensors, leak sensors, thermostats, locks, remotes, and similar.
Step 2. For each matching entity, capture the device name, the room or area it belongs to, the current battery percentage, and if possible the battery type inferred from the entity name or attributes (for example CR2032, AA, AAA). Sort them into three tiers: critical for below 15 percent, low for 15 to 30 percent, and healthy for above 30 percent. Healthy is just for the running log, not for the message.
Step 3. For every device in the critical or low tier, append one row to a Google Sheet using Append Values. Each row should include the run date, the room, the device name, the entity id, the battery percentage, the tier (critical or low), and the inferred battery type if known. Ask me which spreadsheet and tab to use the first time the workflow runs. This sheet is the long running history of which devices die fastest and which batteries I keep buying.
Step 4. If there is at least one device in critical or low, send me a single Slack direct message using Send a Message. Write it as a calm, plain English summary grouped by room. Lead with the critical devices and then the low ones. For each device, include the device name, the battery percentage, and the battery type if you inferred one. End with a one line total, for example "3 critical, 5 low, 47 healthy this month". If nothing is below 30 percent, skip the Slack message entirely. Do not send an "all good" ping.
The point of this workflow is one tidy monthly heads up plus a long running spreadsheet of household battery consumption. Do not alert per device, do not alert when nothing is wrong, and do not duplicate rows in the sheet on the same run.
Additional information
What does this prompt do?
- Scans every battery powered device in your Home Assistant setup once a month, including door sensors, motion sensors, leak sensors, thermostats, locks, and remotes.
- Sorts results into critical, low, and healthy so you know what actually needs attention versus what is fine.
- Sends one tidy Slack DM grouped by room, naming the specific devices and the battery type when it can be inferred, and stays silent when nothing is low.
- Logs every low or critical device to a Google Sheet so you build a history of which devices die fastest and which batteries you keep buying.
What do I need to use this?
- A Home Assistant setup you can reach from the internet, with a long lived access token.
- A Slack account you can sign in to, so the monthly heads up arrives as a direct message.
- A Google account with a spreadsheet ready to receive one row per low battery device.
How can I customize it?
- Change the schedule, for example to the first of the month, every other Sunday, or only during winter when batteries drain faster.
- Adjust the thresholds, so critical and low match what you actually want to hear about for your devices.
- Pick the destination, so the message goes to a channel for the whole household instead of a private DM, or so the spreadsheet lives in a shared folder.
Frequently asked questions
Will this find batteries in every kind of smart home device?
What if everything is fine this month?
Can it tell me what kind of batteries to buy?
Why a monthly audit instead of an alert for each device?
Do I need to list every device by hand?
Related templates
Stop discovering dead batteries the hard way.
Connect Home Assistant, Slack, and Google Sheets once, and Geni runs your monthly battery audit on the first Monday at 8am.