This commit is contained in:
2024-07-03 12:49:13 +03:00
parent cbd2fa9319
commit ff361574ef

View File

@ -237,7 +237,7 @@ void zh_sensor_init(sensor_config_t *sensor_config)
break;
case HAST_BH1750:;
zh_bh1750_init_config_t bh1750_init_config = ZH_BH1750_INIT_CONFIG_DEFAULT();
// Add adjust.
bh1750_init_config.auto_adjust = true;
#ifdef CONFIG_IDF_TARGET_ESP8266
bh1750_init_config.i2c_port = I2C_PORT;
#else
@ -254,6 +254,14 @@ void zh_sensor_init(sensor_config_t *sensor_config)
break;
case HAST_BME680: // For future development.
break;
case HAST_AHT: // For future development.
break;
case HAST_SHT: // For future development.
break;
case HAST_HTU21D: // For future development.
break;
case HAST_HDC1080: // For future development.
break;
default:
ZH_SENSOR_ERROR:
sensor_config->hardware_config.sensor_type = HAST_NONE;
@ -362,6 +370,10 @@ uint8_t zh_send_sensor_config_message(const sensor_config_t *sensor_config)
++messages_quantity;
break;
case HAST_DHT:
case HAST_AHT: // For future development.
case HAST_SHT: // For future development.
case HAST_HTU21D: // For future development.
case HAST_HDC1080: // For future development.
data.payload_data.config_message.sensor_config_message.unique_id = 2;
data.payload_data.config_message.sensor_config_message.sensor_device_class = HASDC_TEMPERATURE;
unit_of_measurement = "°C";