Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

You can have Home Assistant switch a laptop charger on below a battery threshold and off above a second threshold—but only if Home Assistant can read the laptop’s battery level and control the charger’s outlet. First check whether the laptop already offers built-in charge limits; those may be a simpler option.

What the automation needs

  • Battery telemetry: Home Assistant needs a battery-percentage sensor it can read. Its Linux Battery integration reads local Linux system data from /sys/class/power_supply/. Confirm the reported entity and state on your actual setup before relying on it. Other operating systems, or a laptop monitored remotely, may require a different way to expose battery data.
  • A controllable charger outlet: A switch entity must turn power to the charger on and off. A smart plug is one possible setup; Home Assistant documents switch entities and the switch.turn_on action. Check that the plug works with your Home Assistant setup and is rated for the electrical load in your region.
  • A suitable charging method: The laptop must tolerate having charger power switched externally, or provide a native charge-control feature that better suits the job.

Set up the battery sensor and outlet

Verify the battery reading

For a Linux laptop, consult the Linux Battery integration instructions. Check Home Assistant’s entity state against the laptop’s reported battery percentage and observe that it updates as expected. A sensor that is missing, stale, or unavailable cannot reliably drive threshold automations.

Verify the switch

Set up a Home Assistant switch for the outlet controlling the charger, then confirm that its on and off actions actually change charger power. Do not assume compatibility from a product category alone: integration support and electrical ratings matter.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use separate thresholds to control charging

Create two actions: turn the charger outlet on when the battery falls below a lower threshold, and turn it off when the battery rises above a higher threshold. Home Assistant supports battery-level threshold triggers, and its documentation describes a trigger that fires when a battery level crosses into a defined zone. See the battery-level crossed threshold trigger and the Battery integration.

#1 Best Overall
Tapo Smart Plug, Matter Compatible, Energy Monitoring, P110M(4-Pack), 15A
  • 【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.

Using distinct lower and upper thresholds makes the gap between the on and off points explicit, instead of making both actions respond to the same boundary. Choose values for your own laptop and use case; the available documentation does not establish a universally optimal charging range or prove that this approach extends battery life. It also does not provide a tested, one-size-fits-all automation configuration.

Before depending on the setup to run a server, supervise a full cycle: watch the battery sensor cross each threshold, confirm the switch changes state, and verify that the laptop responds as expected. Consider what should happen if Home Assistant, the network, or the plug becomes unavailable; the behavior depends on your particular equipment and configuration.

Rank #2
Tapo Smart Plug Wi-Fi, Energy Monitoring, P115(4-Pack), 15A
  • 【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.

Check for built-in battery charge limits

Some laptops let you set charging start and stop levels in firmware or manufacturer software. For example, System76 documents laptop battery thresholds, while ASUS documents battery care modes in MyASUS. Availability and behavior depend on the exact model. Check your laptop’s own BIOS, firmware, or manufacturer support information before choosing an external outlet automation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Native controls avoid making Home Assistant switch the charger’s power, but they may not expose a battery sensor to Home Assistant or offer the automation you want. An outlet-based approach can use Home Assistant’s readings and actions, but depends on a working sensor, switch, connection, and suitable laptop behavior. Compare those requirements with the laptop’s native options rather than assuming one method fits every server.

Rank #3
Tapo Smart Plug Wi-Fi, Energy Monitoring, P115(2-Pack), 15A
  • 【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.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Interpret charging events carefully

A “battery stopped charging” event does not necessarily mean the battery reached a charge limit: Home Assistant says it can happen when the laptop is unplugged or when charging finishes naturally. If your automation must distinguish those cases, combine the event with battery level and the state of the charger switch. See Home Assistant’s Battery stopped charging trigger.

Rank #4
Govee Smart Plug with Energy Monitoring, WiFi Bluetooth Outlet, 4 Pack
  • 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.

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.