After searching ( like many others ) for a way of charging my two Bosch BES3 E-Bikes not to 100% but stopping at around 90% I ended up with the following plan.
I created a sensor for my TAPO Plug showing the actual Power consumption which is during normal charging around 180 W and slowly decreases as the SOC get`s near 90%.
I cretaed a second sensor substracting 100 from the actual Value, because the following blueprint I’m using can handle only Values with a max. of 100 W.
This shown drop of charging current start’s at 90% SOC and when this happens the automation turn’s of the TAPO Plug and send’s a notification.
Tried this out for a while and you can easily adjust the end of charging by changing the “appliance_finishing_power_threshold:” value
This is the autimation I’m using.
The code for the Helper TemplateSensor with - 100W Power
Thank you for sharing. This is something I have intended to look into for my Haibike which has a Yamaha motor and battery combination.
This should be a good donor project.
Thanks!
I have a different approach as my Shimano STEPS system charges full speed all the way through 100% so I needed an another trigger than a power drop of the smart plug.
Background: The battery management of Shimano is a desaster, my first battery has only an 79% healty status (capacity) after just 71 charging cycles… so before I invest in a new one, I made precautions
I built a light sensor from a ESP8266 and a light resistor (<10€), programmed by ESPhome (see code below). The sensor is placed above the last one of the five charging LEDs of the battery, which starts to blink if charge level exceeds 80%. As the sensor detects that this LED starts blinking, a simple automation shuts down the smart power. My battery gets charged to exactly 82% reproducibly.
Two small but strong ring magnets hold the sensor in place over the last LED of the battery.
The sensor
checks light every 1,5 sec → “light detected”
checks if light was detected at least once in the last 10 seconds → “LED is blinking or on”
reports “LED is blinking or on” to Home Assistant every 5 seconds
This logic was needed as the LED blink as the charge level surpasses 80%. The LED is on exactly every other second (1 sec on, one sec off), so light gets checked every 1,5 sec just to be asynchron with my detection and the blinking. A threshold of 0.7 for light detection is used (0 is darkness, 1 is full light, the LED produces 0.5 in my setup).