ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
mlx90614.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace esphome::mlx90614 {
8
9class MLX90614Component final : public PollingComponent, public i2c::I2CDevice {
10 public:
11 void setup() override;
12 void dump_config() override;
13 void update() override;
14
15 SUB_SENSOR(ambient)
16 SUB_SENSOR(object)
17
18 void set_emissivity(float emissivity) { emissivity_ = emissivity; }
19
20 protected:
22 bool write_emissivity_();
23
24 bool write_register_(uint8_t reg, uint16_t data);
25 i2c::ErrorCode read_register_(uint8_t reg, uint16_t &data);
26
27 float emissivity_{NAN};
28 // Remaining attempts to program the emissivity EEPROM cell, bounded to limit cell wear
31};
32} // namespace esphome::mlx90614
This class simplifies creating components that periodically check a state.
Definition component.h:532
This Class provides the methods to read/write bytes from/to an i2c device.
Definition i2c.h:144
I2CRegister reg(uint8_t a_register)
calls the I2CRegister constructor
Definition i2c.h:164
bool write_register_(uint8_t reg, uint16_t data)
Definition mlx90614.cpp:75
SUB_SENSOR(ambient) SUB_SENSOR(object) void set_emissivity(float emissivity)
Definition mlx90614.h:15
i2c::ErrorCode read_register_(uint8_t reg, uint16_t &data)
Definition mlx90614.cpp:124
ErrorCode
Error codes returned by I2CBus and I2CDevice methods.
Definition i2c_bus.h:13