specific message for each Bosch sensor
This commit is contained in:
parent
b91317fae2
commit
5e27d3ebf4
13
src/main.cpp
13
src/main.cpp
@ -224,8 +224,17 @@ void onHomieEvent(const HomieEvent &event)
|
|||||||
case HomieEventType::MQTT_READY:
|
case HomieEventType::MQTT_READY:
|
||||||
mConnected=true;
|
mConnected=true;
|
||||||
if (mFailedI2Cinitialization) {
|
if (mFailedI2Cinitialization) {
|
||||||
log(MQTT_LEVEL_DEBUG, F("Could not find a valid BME680 sensor, check wiring or "
|
log(MQTT_LEVEL_DEBUG,
|
||||||
"try a different address!"), MQTT_LOG_I2CINIT);
|
#ifdef BME680
|
||||||
|
"Could not find a valid BME680 sensor, check wiring or try a different address!"
|
||||||
|
#else
|
||||||
|
#ifdef BMP280
|
||||||
|
"Could not find a valid BMP280 sensor, check wiring or try a different address!"
|
||||||
|
#else
|
||||||
|
"no I2C sensor defined"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
, MQTT_LOG_I2CINIT);
|
||||||
} else {
|
} else {
|
||||||
log(MQTT_LEVEL_INFO, F("BME680 sensor found"), MQTT_LOG_I2CINIT);
|
log(MQTT_LEVEL_INFO, F("BME680 sensor found"), MQTT_LOG_I2CINIT);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user