Smart Charger is a Home Assistant custom integration that automatically manages when and how to charge your mobile devices so they reach the target battery level at a set time. It handles everything internally. No external automations needed.
Features & Behavior:
- Reads battery, charging and optional presence sensors
- Uses an alarm / wake-up time as the deadline
- Predicts required charging time using learning or sensor input
- Models idle drain (battery loss while idle)
- Calculates the optimal start time and turns the charger on/off itself
- Emergency charge mode if battery falls below a safety threshold
- Stops charging when target reached or when youβre away
- Adaptive polling: faster when battery is low, slower when high
- Reacts immediately to changes in battery, presence, or alarm
- Logs SmartStart, SmartStop, interval changes, etc.
Not production ready. This is a prototype. Much of the code was generated with ChatGPT and has had limited testing.
The code is under frequent changes. After each charge cycle, outcomes are analyzed and improvements or fixes are applied.
Use at your own risk.
Repository:
GitHub β enkama/smart_charger