Texas Instruments BQ27220 battery fuel gauge
The bq27220 platform allows you to use a BQ27220 single-cell Li-Ion battery fuel gauge
(datasheet,
Technical Reference Manual)
in ESPHome. It uses the I²C Bus for communication. The default I²C address is 0x55.
The BQ27220 continuously tracks battery state-of-charge, voltage, current, temperature, and health without requiring an external current-sense resistor. It uses Texas Instruments’ Impedance Track™ algorithm to provide accurate state-of-charge estimation across varying charge and discharge profiles.

Configuration
Section titled “Configuration”# Example configuration entrysensor: - platform: bq27220 battery_level: name: "Battery" voltage: name: "Battery Voltage"Configuration Variables
Section titled “Configuration Variables”- address (Optional, int): The I²C address of the device. Defaults to
0x55. - update_interval (Optional, Time): How often to poll the sensor.
Defaults to
60s. - battery_level (Optional): State of charge in percent (%).
- All other options from Sensor.
- voltage (Optional): Battery voltage in volts (V).
- All other options from Sensor.
- current (Optional): Instantaneous current in amperes (A). Positive when charging, negative when discharging.
- All other options from Sensor.
- temperature (Optional): Battery temperature in degrees Celsius (°C).
- All other options from Sensor.
- remaining_capacity (Optional): Remaining capacity in milliampere-hours (mAh).
- All other options from Sensor.
- full_charge_capacity (Optional): Full charge capacity in milliampere-hours (mAh).
- All other options from Sensor.
- time_to_empty (Optional): Estimated time until the battery is empty, in minutes.
Reports
unknownwhen the battery is not discharging.- All other options from Sensor.
- state_of_health (Optional): Battery health as a percentage of original capacity (%).
- All other options from Sensor.