8static constexpr uint32_t READ_TIMEOUT_ID = 0;
22 LOG_SENSOR(
"",
"MAX6675",
this);
23 LOG_PIN(
" CS Pin: ", this->
cs_);
24 LOG_UPDATE_INTERVAL(
this);
31 uint16_t
val = data[1] | (uint16_t(data[0]) << 8);
36 ESP_LOGW(TAG,
"Got invalid value from MAX6675Sensor (0x%04X)",
val);
41 ESP_LOGD(TAG,
"'%s': Got temperature=%.1f°C", LOG_STR_ARG(this->
get_log_name()), temperature);
bool status_comm_result(bool ok)
Clears the warning when ok, else sets it with message (default "Communication failed"); returns ok.
void set_timeout(const char *name, uint32_t timeout, std::function< void()> &&f)
Set a timeout function with a const char* name.
const LogString * get_log_name() const
Get the name for a "%s" log argument (LOG_STR_ARG).
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)
ESPHOME_LOG_TAG(TAG, "max6675")
void HOT delay(uint32_t ms)