I have a BQ27441 Lipo fuel gauge (Same as on SparkFun Battery Babysitter - LiPo Battery Manager - PRT-13777 - SparkFun Electronics) that I would like to get working with ESPHome.
There’s some documentation about creating a custom senor here: Custom Sensor Component — ESPHome
I tried to follow it along, but I get stuck when I want to use the Adafruit library: PlatformIO Registry
According to the documentation, I should add something like this to my config in ESPHome:
esphome: includes: - my_custom_sensor.h libraries: - "Adafruit BMP085 Library"
I guess I should replace the library with “SparkFun BQ27441 LiPo Fuel Gauge Arduino Library”, but the documentation is not really clear on that point. When I try to compile, I see:
Library Manager: Installing SparkFun BQ27441 LiPo Fuel Gauge Arduino Library
but it seems to mention that, whatever you specify:
Library Manager: Installing some non existing library
However, when I add this to my “my_custom_sensor.h” :
#include "esphome.h" #include "SparkFunBQ27441.h"
I get this error:
In file included from src/main.cpp:26:0: src/my_custom_sensor.h:2:29: fatal error: SparkFunBQ27441.h: No such file or directory
Any idea what I should do to fix this error?