Free tools Windows power users keep installed
One-click scans. No signup required.
You can make a laptop server charge only when its battery falls below a chosen level by sending its battery percentage to Home Assistant and using that reading to control the charger’s outlet. The setup needs two things that work reliably: battery telemetry Home Assistant can read and a controllable switch, such as a compatible smart plug. Use separate lower and upper thresholds to turn charging on and off; the percentages are your choices, not universal battery-health targets.
What the automation needs
- A battery percentage entity: Home Assistant must be able to read the laptop’s battery level. On Linux, its Linux Battery integration reads local system data from
/sys/class/power_supply/. Other operating systems or remote laptop configurations may need a different telemetry route. - A controllable charger outlet: A switch entity must control power to the laptop’s charger. Home Assistant’s Switch integration describes switch entities, including smart plugs; the switch turn-on action is one way to control one.
- Two distinct thresholds: A lower level starts charging and a higher level stops it. This gap, often called hysteresis, prevents repeated switching at a single boundary as the battery reading fluctuates.
Check for built-in charge limits first
Some laptops offer firmware or manufacturer controls for when charging starts and stops. For example, System76 documents laptop battery thresholds, and ASUS documents battery-care modes in MyASUS. Availability and behavior depend on the exact model. If your laptop supports suitable native limits, they may be a simpler fit than switching charger power through Home Assistant.
As an Amazon Associate I earn from qualifying purchases.
Set up the Home Assistant control loop
- Expose the battery reading. On a Linux laptop, consult the Linux Battery integration instructions. Confirm that Home Assistant can see a battery entity and that its state reflects the laptop’s actual percentage before using it in an automation.
- Connect and verify the outlet switch. Set up a Home Assistant-compatible controllable outlet for the charger. Confirm that its switch entity really turns charger power on and off. Check the outlet’s electrical rating against the charger and follow local electrical requirements.
- Choose a lower and an upper threshold. Pick a lower percentage that should start charging and a higher one that should stop it. Home Assistant’s battery-level crossed threshold trigger fires when a battery level crosses into a defined zone. The Battery integration documentation describes battery-related triggers and conditions. Use the switch entity to turn the outlet on at the lower threshold and off at the upper one.
- Test the behavior while present. Watch the battery reading and outlet state as the automation runs. Verify that each threshold causes the intended action and that the laptop resumes charging as expected before relying on it unattended as a server.
The documentation describes the building blocks, not a tested automation for every laptop, plug, or Home Assistant setup. Exact entity names and configuration depend on your devices and integration.
Decide what should happen if Home Assistant is unavailable
External switching depends on the outlet and the control path working when a threshold is reached. The cited Home Assistant documentation does not prescribe how a particular plug behaves during a network, Home Assistant, or device outage. Consider that uncertainty before making battery control part of a server’s unattended operation. A laptop-native charge limit, where available, does not rely on Home Assistant to issue each on/off command.
#1 Best Overall
- 【Matter-Certified】Matter-certified devices, regardless of brand, can work together and are compatible with most major smart home platforms like Amazon Alexa, Apple HomeKit, Google Home, and Samsung SmartThings. Enjoy more flexible and unified control.
- 【Insightful Energy Tracking】 Monitor your energy consumption with in-depth statistics and clear visuals, helping you optimize power usage.
- 【Estimate Your Energy Bill】 Enhance energy management by integrating with billing systems for clear cost visualization (both single and periodic readings). Additionally, programmable scheduling allows automatic operation of high-consumption devices during off-peak hours with lower electricity rates, resulting in cost savings.
- 【Overcharge Prevention & Power Management】 Automatically cuts off power based on user-set thresholds and durations to prevent overcharging, conserve energy, and protect connected devices from overcurrents by shutting off when power exceeds set limits.
- 【Voice & Remote Control】 With built-in support for both Alexa and Google Assistant, issue simple voice commands to adjust settings, turn devices on or off, or even access specific functions without lifting a finger. Manage Tapo P110M and its connected devices from anywhere with the user-friendly Tapo app.
Do not treat “stopped charging” as a full-battery signal
Home Assistant’s Battery stopped charging trigger can fire when a device is unplugged or when charging finishes naturally. That event alone does not distinguish the two situations. If your automation needs to tell them apart, combine it with the battery level and the relevant outlet or charging state rather than treating the event as proof that the battery is full.
Quick Recap
Rank #4
- Real-Time Energy Monitoring: Smart plugs track the real-time power, current, and voltage of your plug-in devices on Govee Home App. Supports reviewing data daily / weekly / monthly and up to 1 year to effectively save energy and reduce waste.
- Stable WiFi & Bluetooth Connectivity: Connecting with Govee Home App via WiFi and Bluetooth to access the Smart Plug easily, even away, you can remotely control your home appliances and never come back to a dark home. Note: Do NOT support 5G Wi-Fi.
- Convenient Voice Control: Free hands by using simple voice commands with Alexa and Google Assistant. Just once setting, you can enjoy coffee immediately after waking up and experience a leisurely morning. It's also a caring choice for the elderly.
- Scheduling & Group Control: Smart plugs with timer help create detailed to the minute schedules power your appliances on/off automatically for helping save energy and money. And supports share on the Govee Home App to enjoy the smart life together.
- Safe and Comfortable Smart Home: Govee plug not only fully FCC & ETL certified, but also made of fire-resistant materials. 15A 120V smart outlet is suitable for high-power appliances such as coffee maker, brings you a stable and safe life assistant.
Rank #3
- 【Insightful Energy Tracking】Track your plug's energy use with clear and easy-to-understand statistics and intuitive charts, helping you optimize power usage.
- 【Estimate Your Energy Bill】 Enhance energy management by integrating with billing systems for clear cost visualization (both single and periodic readings). Additionally, programmable scheduling allows automatic operation of high-consumption devices during off-peak hours with lower electricity rates, resulting in cost savings.
- 【Smart Charging for Devices】Automatically cuts power once your device reaches the low-battery limit you set, preventing overcharging.
- 【Auto-Shutoff】Prevents electrical overload by automatically shutting off devices that use too much power.
- 【Voice & Remote Control】 With built-in support for both Alexa and Google Assistant, issue simple voice commands to adjust settings, turn devices on or off, or even access specific functions without lifting a finger. Manage Tapo P115 and its connected devices from anywhere with the user-friendly Tapo app.
Rank #2
- 【Insightful Energy Tracking】Track your plug's energy use with clear and easy-to-understand statistics and intuitive charts, helping you optimize power usage.
- 【Estimate Your Energy Bill】 Enhance energy management by integrating with billing systems for clear cost visualization (both single and periodic readings). Additionally, programmable scheduling allows automatic operation of high-consumption devices during off-peak hours with lower electricity rates, resulting in cost savings.
- 【Smart Charging for Devices】Automatically cuts power once your device reaches the low-battery limit you set, preventing overcharging.
- 【Auto-Shutoff】Prevents electrical overload by automatically shutting off devices that use too much power.
- 【Voice & Remote Control】 With built-in support for both Alexa and Google Assistant, issue simple voice commands to adjust settings, turn devices on or off, or even access specific functions without lifting a finger. Manage Tapo P115 and its connected devices from anywhere with the user-friendly Tapo app.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




