28 float percent = (float) ((
raw >> 8) + 0.003906f * (
raw & 0x00ff));
39 ESP_LOGCONFIG(TAG,
"MAX17043:");
41 LOG_UPDATE_INTERVAL(
this);
bool status_comm_result(bool ok)
Clears the warning when ok, else sets it with message (default "Communication failed"); returns ok.
bool read_byte_16(uint8_t a_register, uint16_t *data)
sensor::Sensor * voltage_sensor_
sensor::Sensor * battery_remaining_sensor_
void dump_config() override
void publish_state(float state)
Publish a new state to the front-end.
ESPHOME_LOG_TAG(TAG, "max17043")