10static constexpr uint8_t REGISTER_DATA = 0x00;
11static constexpr size_t DATA_SIZE = 14;
14 uint8_t data[DATA_SIZE];
19 uint8_t data[DATA_SIZE];
30 ESP_LOGCONFIG(TAG,
"GY-39:");
32 LOG_UPDATE_INTERVAL(
this);
33 LOG_SENSOR(
" ",
"Illuminance", this->illuminance_sensor_);
34 LOG_SENSOR(
" ",
"Temperature", this->temperature_sensor_);
35 LOG_SENSOR(
" ",
"Pressure", this->pressure_sensor_);
36 LOG_SENSOR(
" ",
"Humidity", this->humidity_sensor_);
37 LOG_SENSOR(
" ",
"Altitude", this->altitude_sensor_);
virtual void setup()
Where the component's initialization should happen.
bool status_comm_result(bool ok)
Clears the warning when ok, else sets it with message (default "Communication failed"); returns ok.
bool ESPHOME_ALWAYS_INLINE setup_check(bool ok)
Marks the component failed with message (default "Communication failed") unless ok; returns ok.
void dump_config() override
bool read_bytes(uint8_t a_register, uint8_t *data, uint8_t len)
Compat APIs All methods below have been added for compatibility reasons.
ESPHOME_LOG_TAG(TAG, "gy39")
constexpr T encode_value(const uint8_t *bytes)
Encode a value from its constituent bytes (from most to least significant) in an array with length si...