WIP
This commit is contained in:
@ -237,7 +237,7 @@ void zh_sensor_init(sensor_config_t *sensor_config)
|
|||||||
break;
|
break;
|
||||||
case HAST_BH1750:;
|
case HAST_BH1750:;
|
||||||
zh_bh1750_init_config_t bh1750_init_config = ZH_BH1750_INIT_CONFIG_DEFAULT();
|
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
|
#ifdef CONFIG_IDF_TARGET_ESP8266
|
||||||
bh1750_init_config.i2c_port = I2C_PORT;
|
bh1750_init_config.i2c_port = I2C_PORT;
|
||||||
#else
|
#else
|
||||||
@ -254,6 +254,14 @@ void zh_sensor_init(sensor_config_t *sensor_config)
|
|||||||
break;
|
break;
|
||||||
case HAST_BME680: // For future development.
|
case HAST_BME680: // For future development.
|
||||||
break;
|
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:
|
default:
|
||||||
ZH_SENSOR_ERROR:
|
ZH_SENSOR_ERROR:
|
||||||
sensor_config->hardware_config.sensor_type = HAST_NONE;
|
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;
|
++messages_quantity;
|
||||||
break;
|
break;
|
||||||
case HAST_DHT:
|
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.unique_id = 2;
|
||||||
data.payload_data.config_message.sensor_config_message.sensor_device_class = HASDC_TEMPERATURE;
|
data.payload_data.config_message.sensor_config_message.sensor_device_class = HASDC_TEMPERATURE;
|
||||||
unit_of_measurement = "°C";
|
unit_of_measurement = "°C";
|
||||||
|
Reference in New Issue
Block a user