10 static const char *
const TAG =
"tmp117";
18 if ((uint16_t) data != 0x8000) {
21 ESP_LOGD(TAG,
"Got temperature=%.2f°C", temperature);
25 ESP_LOGD(TAG,
"TMP117 not ready");
29 ESP_LOGCONFIG(TAG,
"Setting up TMP117...");
43 ESP_LOGD(TAG,
"TMP117:");
46 ESP_LOGE(TAG,
"Communication with TMP117 failed!");
48 LOG_SENSOR(
" ",
"Temperature",
this);
53 ESP_LOGW(TAG,
"Updating TMP117 failed!");
61 ESP_LOGW(TAG,
"Reading TMP117 config failed!");
69 ESP_LOGE(TAG,
"Writing TMP117 config failed!");
bool read_byte_16(uint8_t a_register, uint16_t *data)
const float DATA
For components that import data from directly connected sensors like DHT.
float get_setup_priority() const override
void status_set_warning(const char *message="unspecified")
bool write_config_(uint16_t config)
void dump_config() override
void status_clear_warning()
bool read_config_(uint16_t *config)
void publish_state(float state)
Publish a new state to the front-end.
bool read_data_(int16_t *data)
virtual void mark_failed()
Mark this component as failed.
Implementation of SPI Controller mode.
bool write_byte_16(uint8_t a_register, uint16_t data)