ESPHome
2025.5.0
Loading...
Searching...
No Matches
esphome
components
mics_4514
mics_4514.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/components/i2c/i2c.h
"
4
#include "
esphome/components/sensor/sensor.h
"
5
#include "
esphome/core/component.h
"
6
#include "
esphome/core/hal.h
"
7
8
namespace
esphome
{
9
namespace
mics_4514 {
10
11
class
MICS4514Component
:
public
PollingComponent
,
public
i2c::I2CDevice
{
12
SUB_SENSOR(carbon_monoxide)
13
SUB_SENSOR(nitrogen_dioxide)
14
SUB_SENSOR(methane)
15
SUB_SENSOR(ethanol)
16
SUB_SENSOR(hydrogen)
17
SUB_SENSOR(ammonia)
18
19
public
:
20
void
setup
()
override
;
21
void
dump_config()
override
;
22
float
get_setup_priority()
const override
;
23
void
update()
override
;
24
25
protected
:
26
bool
warmed_up_
{
false
};
27
bool
initial_
{
true
};
28
29
float
ox_calibration_
{0};
30
float
red_calibration_
{0};
31
};
32
33
}
// namespace mics_4514
34
}
// namespace esphome
esphome::Component::setup
virtual void setup()
Where the component's initialization should happen.
Definition
component.cpp:51
esphome::PollingComponent
This class simplifies creating components that periodically check a state.
Definition
component.h:301
esphome::i2c::I2CDevice
This Class provides the methods to read/write bytes from/to an i2c device.
Definition
i2c.h:133
esphome::mics_4514::MICS4514Component
Definition
mics_4514.h:11
esphome::mics_4514::MICS4514Component::red_calibration_
float red_calibration_
Definition
mics_4514.h:30
esphome::mics_4514::MICS4514Component::warmed_up_
bool warmed_up_
Definition
mics_4514.h:26
esphome::mics_4514::MICS4514Component::initial_
bool initial_
Definition
mics_4514.h:27
esphome::mics_4514::MICS4514Component::ox_calibration_
float ox_calibration_
Definition
mics_4514.h:29
component.h
hal.h
i2c.h
esphome
Providing packet encoding functions for exchanging data with a remote host.
Definition
a01nyub.cpp:7
sensor.h
Generated by
1.12.0