ESPHome
2026.11.0-dev
Loading...
Searching...
No Matches
esphome
components
max17048
max17048.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/component.h
"
4
#include "
esphome/components/sensor/sensor.h
"
5
#include "
esphome/components/i2c/i2c.h
"
6
7
namespace
esphome::max17048
{
8
9
class
MAX17048Component
final :
public
PollingComponent
,
public
i2c::I2CDevice
{
10
SUB_SENSOR(battery_voltage)
11
SUB_SENSOR(battery_level)
12
SUB_SENSOR(rate)
13
14
public
:
15
void
setup
()
override
;
16
void
dump_config()
override
;
17
void
update()
override
;
18
};
19
20
}
// namespace esphome::max17048
esphome::Component::setup
virtual void setup()
Where the component's initialization should happen.
Definition
component.cpp:84
esphome::PollingComponent
This class simplifies creating components that periodically check a state.
Definition
component.h:514
esphome::i2c::I2CDevice
This Class provides the methods to read/write bytes from/to an i2c device.
Definition
i2c.h:132
esphome::max17048::MAX17048Component
Definition
max17048.h:9
component.h
i2c.h
esphome::max17048
Definition
max17048.cpp:4
sensor.h
Generated by
1.12.0