A UPS is not finished when the server stops rebooting during a storm. It is finished when the house tells me the power failed, the NAS knows how long it can run, and every machine shuts down cleanly before the battery is empty. For sizing and hardware choices, my UPS guide for NAS and home servers covers the buying decision before this monitoring setup.
That is the useful division of labor: Network UPS Tools, usually called NUT, owns the UPS connection and shutdown policy. Home Assistant watches the state and tells me what happened. The dashboard is not the safety mechanism. It is the part that makes the safety mechanism visible.
I use this pattern because it survives ordinary maintenance. Home Assistant can restart without changing the NAS shutdown policy. The NAS can reboot while the rest of the house continues to report other devices. When the internet is down, the UPS and local NUT server still have a job to do.
Start with the real load
Before buying hardware, measure the load with a Kill A Watt meter. Measure the NAS, server, network switch, and anything else that will actually be on battery. Do not size a UPS from the wattage printed on a power-supply label.
A small NAS and mini PC often draw far less than people expect. That is good news. A 1000VA to 1500VA pure-sine unit usually provides enough headroom for a modest home lab, and the extra capacity is more useful as the battery ages than as an excuse to run a desktop rack through a two-hour outage.
I want the continuous watt rating to be roughly twice my measured peak. More important than a huge runtime number is a clean handoff to battery and enough time for NUT to issue a shutdown. For active-PFC power supplies, I prefer pure sine wave output. A cheap stepped-sine unit is not a bargain if the server drops when the power fails.
My value default is the CyberPower CP1500PFCLCD. The APC Back-UPS Pro BR1500MS is another sensible choice when replaceable batteries and broad documentation matter more than the lowest price.
Put NUT in charge of the USB cable
Connect the UPS USB cable to one machine only. That machine runs the NUT server and becomes the source of truth for the UPS. Do not connect the same UPS to a NAS and Home Assistant at the same time and expect both to own it. One process should talk to the USB device; clients read the published state.
For many homes, the NAS is the right NUT server. It already needs to stay alive during an outage, it knows how to shut itself down, and Synology, TrueNAS, and Unraid all provide some form of UPS support. If your server is a Linux host with the USB cable, run NUT there instead.
Home Assistant then uses its NUT integration as a client. It reads battery charge, load, runtime, input voltage, and the on-battery state. It does not need permission to shut down the UPS. Keep the destructive action close to the machine that owns the data and let Home Assistant remain the observer.
If you use a configuration example, replace the example values with your own credentials in the machine’s secret store. Do not paste real usernames or passwords into Home Assistant YAML, dashboards, or forum posts.
Add the Home Assistant integration
In Home Assistant, add the Network UPS Tools integration from Settings, Devices and services. Enter the NUT server address, the NUT port, and the read-only account you created on the server. The normal port is 3493, but use the value from your NUT configuration rather than assuming it.
After the integration loads, check the device page before writing automations. Entity names vary by UPS model. You may see battery charge as a percentage, runtime as seconds, load as a percentage, and a binary sensor that indicates whether the UPS is on battery. Some models expose replacement date, input voltage, and battery voltage too.
Rename the useful entities with stable names. I use names that describe the location and purpose, such as server_room_ups_battery and server_room_ups_on_battery. Friendly names change; entity IDs are what your automations depend on. Do not build a dozen automations before you know which values your specific UPS reports.
The four alerts I actually want
The first alert fires when the UPS switches to battery. It tells me that the grid changed immediately, even if every light in the house came back on. A short, single notification is useful. Repeating every minute is not.
The second alert fires when the battery returns to mains. Include the duration if your setup exposes it, or at least say that the outage ended. This creates a simple history of flickers and makes it easier to spot a failing circuit or a neighborhood power problem.
The third alert fires when runtime falls below the shutdown margin. This is different from battery percentage. A battery can report a comfortable percentage while a growing load leaves only a few minutes of runtime. Use runtime when it is available, and set the threshold above the NUT shutdown threshold so you have time to react.
The fourth alert fires when the battery needs replacement or charge does not recover after the line returns. A UPS with a dead battery can look healthy until the next outage. Put this check on a monthly reminder or a low-priority notification that you will actually read.
I do not alert on normal load changes. A NAS spinning up a disk is not an incident. Battery percentage moving from 99 to 98 is not an incident. Alert on transitions that require a decision.
Test the system without guessing
A dashboard that says “online” is not a test. Test the path deliberately. Start by checking that Home Assistant can read the NUT server while the UPS is on mains. Then use the UPS’s built-in test or unplug the input power while the equipment remains connected to battery outlets.
Watch four things: the NUT state changes to battery, Home Assistant reflects that state, the notification arrives once, and the NAS does not shut down immediately. Restore input power and confirm the recovery notification. Do not run a full battery drain as a casual test; old batteries can fail abruptly and some UPS units do not recover gracefully from abuse.
Next, test the shutdown policy in a maintenance window. Use the NAS documentation for its safe shutdown test. The goal is to prove that the device can receive the low-battery event, flush writes, stop services, and power off before the battery disappears. A phone alert is not proof of a safe shutdown.
Record the test date and observed runtime. Batteries age, and the runtime estimate becomes less trustworthy as capacity falls. A short annual test and a replacement reminder are more useful than a dramatic emergency test every few years.
Keep network gear on the right outlets
Most UPS units have battery-backed outlets and surge-only outlets. Put the NUT server, NAS, network switch, and the access point needed to reach them on battery. Do not fill the battery side with a laser printer, heater, or desktop workstation that can consume the runtime needed by the data-bearing machines.
The network switch matters because Home Assistant cannot report a remote UPS if the path to the NUT server disappears. Keep the network path short and simple. If your switch has PoE, remember that access points and cameras can consume more battery than the server itself. Measure the complete load instead of assuming the network is negligible.
A UPS does not solve every power problem. It does not make an overloaded circuit safe, and it does not replace surge protection for outdoor cables. Treat it as one layer: stable electrical power, graceful shutdown, backups, and alerts that tell you when a layer is failing.
The Bottom Line
Put the UPS USB cable on one reliable host, let NUT own shutdown, and connect Home Assistant as a read-only observer. Monitor on-battery state, runtime, recovery, and battery health. Those four signals tell you whether the protection system is working without turning every voltage fluctuation into an emergency.
Buy enough pure-sine capacity for your measured load, not the largest VA number on the shelf. Then test the actual handoff and safe shutdown while the house is calm. The value of a UPS is not that it stays invisible. It is that the one time the power fails, your data-bearing machines already know what to do.
