ESPHome
2026.11.0b6
Loading...
Searching...
No Matches
esphome
components
kmeteriso
kmeteriso.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
#include "
esphome/components/i2c/i2c_bus.h
"
7
8
namespace
esphome::kmeteriso
{
9
11
class
KMeterISOComponent
final :
public
PollingComponent
,
public
i2c::I2CDevice
{
12
SUB_SENSOR(
temperature
)
13
SUB_SENSOR(internal_temperature)
14
15
public
:
16
// ========== INTERNAL METHODS ==========
17
// (In most use cases you won't need these)
18
void
setup
()
override
;
19
void
update()
override
;
20
21
protected
:
22
enum
ErrorCode
{
23
NONE
= 0,
24
COMMUNICATION_FAILED
,
25
STATUS_FAILED
,
26
} error_code_{
NONE
};
27
};
28
29
}
// namespace esphome::kmeteriso
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:532
esphome::i2c::I2CDevice
This Class provides the methods to read/write bytes from/to an i2c device.
Definition
i2c.h:144
esphome::kmeteriso::KMeterISOComponent
This class implements support for the KMeterISO thermocouple sensor.
Definition
kmeteriso.h:11
esphome::kmeteriso::KMeterISOComponent::NONE
enum esphome::kmeteriso::KMeterISOComponent::ErrorCode NONE
esphome::kmeteriso::KMeterISOComponent::ErrorCode
ErrorCode
Definition
kmeteriso.h:22
esphome::kmeteriso::KMeterISOComponent::STATUS_FAILED
@ STATUS_FAILED
Definition
kmeteriso.h:25
esphome::kmeteriso::KMeterISOComponent::COMMUNICATION_FAILED
@ COMMUNICATION_FAILED
Definition
kmeteriso.h:24
component.h
i2c.h
i2c_bus.h
esphome::kmeteriso
Definition
kmeteriso.cpp:6
sensor.h
temperature
uint16_t temperature
Definition
sun_gtil2.cpp:12
Generated by
1.12.0