7static const char *
const TAG =
"max6675";
21 ESP_LOGCONFIG(TAG,
"Setting up MAX6675Sensor '%s'...", this->
name_.
c_str());
25 LOG_SENSOR(
"",
"MAX6675",
this);
26 LOG_PIN(
" CS Pin: ", this->
cs_);
27 LOG_UPDATE_INTERVAL(
this);
35 uint16_t
val = data[1] | (uint16_t(data[0]) << 8);
38 if ((val & 0x04) != 0) {
40 ESP_LOGW(TAG,
"Got invalid value from MAX6675Sensor (0x%04X)",
val);
46 ESP_LOGD(TAG,
"'%s': Got temperature=%.1f°C", this->
name_.
c_str(), temperature);
void status_set_warning(const char *message="unspecified")
void status_clear_warning()
void set_timeout(const std::string &name, uint32_t timeout, std::function< void()> &&f)
Set a timeout function with a unique name.
constexpr const char * c_str() const
float get_setup_priority() const override
void dump_config() override
void publish_state(float state)
Publish a new state to the front-end.
void spi_setup() override
void read_array(uint8_t *data, size_t length)
const float DATA
For components that import data from directly connected sensors like DHT.
Providing packet encoding functions for exchanging data with a remote host.
void IRAM_ATTR HOT delay(uint32_t ms)