ESPHome  2024.9.2
mcp9600.h
Go to the documentation of this file.
1 #pragma once
2 
6 
7 namespace esphome {
8 namespace mcp9600 {
9 
10 enum MCP9600ThermocoupleType : uint8_t {
19 };
20 
22  public:
23  void setup() override;
24  void dump_config() override;
25  void update() override;
26 
27  float get_setup_priority() const override { return setup_priority::DATA; }
28 
29  void set_hot_junction(sensor::Sensor *hot_junction) { this->hot_junction_sensor_ = hot_junction; }
30  void set_cold_junction(sensor::Sensor *cold_junction) { this->cold_junction_sensor_ = cold_junction; }
32  this->thermocouple_type_ = thermocouple_type;
33  };
34 
35  protected:
36  uint8_t device_id_{0};
37 
40 
42 
43  enum ErrorCode {
47  } error_code_{NONE};
48 };
49 
50 } // namespace mcp9600
51 } // namespace esphome
const float DATA
For components that import data from directly connected sensors like DHT.
Definition: component.cpp:19
sensor::Sensor * cold_junction_sensor_
Definition: mcp9600.h:39
This class simplifies creating components that periodically check a state.
Definition: component.h:283
void set_thermocouple_type(MCP9600ThermocoupleType thermocouple_type)
Definition: mcp9600.h:31
enum esphome::mcp9600::MCP9600Component::ErrorCode NONE
void set_cold_junction(sensor::Sensor *cold_junction)
Definition: mcp9600.h:30
MCP9600ThermocoupleType thermocouple_type_
Definition: mcp9600.h:41
float get_setup_priority() const override
Definition: mcp9600.h:27
void set_hot_junction(sensor::Sensor *hot_junction)
Definition: mcp9600.h:29
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
Base-class for all sensors.
Definition: sensor.h:57
This Class provides the methods to read/write bytes from/to an i2c device.
Definition: i2c.h:133
sensor::Sensor * hot_junction_sensor_
Definition: mcp9600.h:38