Analog Devices MAX17048/MAX17049 battery fuel gauge
The max17048 platform allows you to accurately monitor the remaining capacity of one or more lithium-ion batteries using a MAX17048 or MAX17049 (datasheet) in ESPHome.
The IC uses ModelGauge™, a sophisticated lithium-ion battery modeling scheme, to continuously track the battery’s state of charge (SOC) over a wide range of charge/discharge profiles.
Unlike traditional fuel gauges, the ModelGauge™ algorithm eliminates the need for relearn cycles and an external current-sense resistor.
The MAX17048 is designed to monitor one cell, while the MAX17049 is designed to monitor two cells. Apart from that, there are no significant differences between the two ICs. It uses the I²C Bus for communication.
ℹ️ Note
See the datasheet to learn how the MAX17048/MAX17049 behaves in different situation.

Configuration
# Example configuration entry
sensor:
- platform: max17048
address: 0x36
update_interval: 60s
battery_voltage:
name: "Battery Voltage"
battery_level:
name: "Battery Level"
rate:
name: "Battery Rate"Sensors
- battery_voltage (Optional, float): The voltage measured at the cell. All other options from Sensor.
- battery_level (Optional, float): The percentage of battery remaining using the ModelGauge™ battery-modelling scheme. All other options from Sensor.
- rate (Optional, float): The percentage per hour (%/h) on which the cell is charged or discharged, calculated using the ModelGauge™ battery-modelling scheme. All other options from Sensor.