Skip to content

Add Charging Completion Automation Blueprint and Documentation - #9

Open
agarthand wants to merge 2 commits into
mtheli:masterfrom
agarthand:blueprint-charging-complete
Open

agarthand wants to merge 2 commits into
mtheli:masterfrom
agarthand:blueprint-charging-complete

Conversation

@agarthand

Copy link
Copy Markdown

Summary

Adds an optional Home Assistant automation blueprint that runs configurable
actions when an ISDT charging session has ended.

The blueprint provides a reusable basis for notifications, text-to-speech
announcements, visual indicators, or any other Home Assistant action that
should run after charging has completed.

Motivation

The ISDT Air BLE integration exposes all information required to detect an
active charging session and its completion, but users currently need to build
their own automation for this common use case.

This blueprint provides a reusable and configurable automation for detecting
the end of a charging session and running user-defined completion actions.

Detection method

The blueprint uses the charger's Total Charging Current sensor instead of the
individual slot status sensors.

A charging session is detected when the total charging current remains above a
configurable start threshold for a defined duration. The session is considered
finished when the total charging current remains below a configurable finish
threshold for a defined duration.

Using the total charging current keeps the detection independent of the number
of occupied slots and avoids relying on individual slot status sensors, which
may temporarily report unknown or unavailable during Bluetooth reconnects.

Configuration

The blueprint provides configurable values for:

  • Total charging current sensor
  • Charging start threshold
  • Charging start duration
  • Charging finish threshold
  • Charging finish duration
  • Maximum charging session duration
  • Completion actions

The included default values are:

  • Charging start: above 0.05 A for 15 seconds
  • Charging finish: below 0.01 A for 1 minute
  • Maximum session duration: 24 hours

All default values can be overridden when creating an automation from the
blueprint.

The completion action is intentionally not predefined. Users can configure any
Home Assistant action, for example:

  • A mobile notification
  • A text-to-speech announcement
  • A light or visual signal
  • An existing personal notification script
  • A sequence containing multiple actions

Changes

  • Add blueprints/automation/charging_complete.yaml
  • Add a new README section describing the blueprint
  • Document the blueprint's detection logic and configurable inputs
  • Document that the blueprint is optional and must be imported separately from
    the HACS integration
  • Add the GitHub import URL and setup instructions
  • Document the limitation that stopped charging current may also indicate
    manually removed batteries or an aborted charging session

Limitations

The blueprint detects that a previously active charging session no longer
draws relevant charging current.

It cannot distinguish between:

  • A successfully completed charging session
  • Batteries that were manually removed during charging
  • A manually aborted charging session
  • Another condition that causes the charger to stop supplying charging current

The configurable start and finish durations help prevent brief current changes
from being interpreted as complete charging sessions.

Testing

Tested with an ISDT C4 Air.

Verified:

  • The blueprint accepts the Total Charging Current sensor
  • Brief current changes below the configured start duration do not start a
    charging session
  • Sustained charging current starts the automation
  • Short zero-current phases do not trigger the completion action
  • unknown and unavailable sensor states do not satisfy the numeric finish
    condition
  • The configured completion actions run after the charging current remains
    below the finish threshold for the configured duration
  • A new charging session can be detected after the previous automation run has
    completed

Repository structure

The proposed blueprint location is:

blueprints/automation/charging_complete.yaml

I am happy to move the blueprint to a different location if another repository
structure is preferred.

@agarthand

Copy link
Copy Markdown
Author

Please let's hold this PR for a moment. It seems I have overseen an edge case where the notification is not triggered correctly. Will convert PR back to draft and verify next days to correct and resubmit.

@agarthand
agarthand marked this pull request as draft September 10, 2026 19:47
This blueprint detects the end of a charging session based on total charging current and executes specified actions. It includes configurable thresholds and durations for starting and finishing charging detection.
Added a section on Charging Completion Automation Blueprint, detailing its functionality and import instructions.
@agarthand
agarthand force-pushed the blueprint-charging-complete branch from 896ba5c to 85906bf Compare September 10, 2026 20:18
@agarthand

Copy link
Copy Markdown
Author

After further investigation, I discovered that the reported issue originated from my own notification script. I have re-tested the PR and can confirm that it behaves as expected. The PR is working correctly from my side and is ready for review and merge.

@agarthand
agarthand marked this pull request as ready for review September 13, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant