A Bosch PowerTube 500 battery for an e-bike is a relatively expensive component, and after a previous battery was likely damaged by deep discharge following prolonged storage with too little charge during winter, the idea emerged to investigate how the battery could be maintained in a gentler and more automated way.
Bosch generally recommends that batteries should not be stored for long periods at either very high or very low charge levels, and that a moderate charge range is preferable for long-term storage. Bosch also recommends frost-free storage during longer periods of inactivity and avoiding charging at very low temperatures. However, the bike and battery may at times remain outdoors for extended periods, which makes the winter season particularly relevant if it has not been possible to move the battery indoors in time.
The challenge
Unlike many electric cars and some newer cloud-connected e-bike systems, the Bosch system used here does not provide direct access to the battery SOC (State of Charge) in Home Assistant. There is therefore no simple way to control charging based on exact battery percentages.
The solution therefore had to rely on indirect measurements and practical observations: charger power consumption, supplied energy, and the known charging behavior of the Bosch charger.
Hardware and Zigbee connection
The installation consists of a Bosch PowerTube 500 battery, a Bosch Standard Charger 4A, a Sonoff Zigbee smart plug with energy monitoring, and Home Assistant with ZHA integration.
The smart plug is used both to switch the charger on and off and to measure power consumption and energy usage during charging.
In practice, the Zigbee connection proved to be an important part of the solution. The plug could occasionally become unstable. The reason was that the bike was parked near the garage approximately 40 m from the house. It therefore became necessary to improve Zigbee coverage in the area around the charger.
For this purpose, an Aeotec Range Extender Zi was used as a Zigbee router. It was placed indoors on a wall facing the garage. After improving the Zigbee connection, the control became stable.
This highlights a general aspect of Home Assistant automation: automation is only practically useful if the connection to the devices is stable.
The mains-powered devices referenced in this article — the Aeotec Range Extender Zi and the Zigbee smart plug — are Schuko/EU versions, which is the standard in Denmark and most of continental Europe. Readers outside this region should verify that they order the correct plug variant for their market.
Observations during charging
During charging, it was observed that the Bosch charger typically starts at around 150–160 W. Power consumption remains relatively high at lower charge levels but gradually decreases at higher charge levels. When the battery is nearly full, the power drops significantly, and around 10–20 W the battery appears to be close to fully charged.
These observations correspond reasonably well with descriptions of the Bosch charger’s CC/CV charging profile (Constant Current / Constant Voltage), where the charger initially delivers a high constant current and later gradually reduces power.
Considerations regarding maintenance charging
The goal was not necessarily to reach a precise charge percentage but rather to avoid deep discharge, avoid long periods at 100% charge, and keep the battery within a moderate range during extended storage.
Since SOC is not directly available, experiments were made with an indirect method in which charging is started automatically at regular intervals while Home Assistant monitors the charger’s power consumption. When the power falls below a selected level, charging is automatically stopped.
In the current version of the automation, maintenance charging stops when the charger power has remained below approximately 100 W for a short period. The reasoning behind this threshold is that the Bosch charger at lower charge levels typically operates close to maximum power, while power gradually decreases at higher charge levels.
The assumption is therefore that a stop threshold around 100 W will interrupt charging before the battery reaches full charge, while at the same time avoiding storage at a very low charge level. However, this is still a preliminary threshold that may later prove to require adjustment.
The assumption behind this method is that decreasing charging power can serve as a rough indicator of increasing charge level. However, this is a practical solution — not a precise SOC measurement.
Session-based energy measurement
Since the Zigbee plug’s energy meter is a cumulative counter (total_increasing), a separate session-based measurement was created in Home Assistant.
When charging starts, the current Wh value is stored, after which Home Assistant displays the difference between the current measurement and the starting value. This makes it possible to display the energy consumption for each charging session directly in the user interface.
Home Assistant user interface
A simple Lovelace card was created with functions for manual charging, stopping charging, and activating automatic maintenance charging. The card simultaneously displays power consumption and supplied energy during charging and uses colored icons to indicate the active state.
Preliminary conclusion
The project is still experimental, but Home Assistant makes it possible to establish a practical maintenance solution without direct access to the battery SOC. Instead, energy monitoring, charging power, time-based control, and Bosch’s general battery storage recommendations are used as the basis for the automation.

