diff --git a/ESP32-Rainmaker-Switch/main/app_main.c b/ESP32-Rainmaker-Switch/main/app_main.c index e4b1a816..d5eeac00 100644 --- a/ESP32-Rainmaker-Switch/main/app_main.c +++ b/ESP32-Rainmaker-Switch/main/app_main.c @@ -247,7 +247,11 @@ void app_main() temp_sensor_device = esp_rmaker_temp_sensor_device_create("Server Temp", NULL, app_get_current_temperature()); esp_rmaker_node_add_device(node, temp_sensor_device); - /* CREATE AMBIENT LIGHT SENSOR DEVICE*/ + /* CREATE AMBIENT LIGHT SENSOR DEVICE */ + + /* CREATE INTERNAL TEMPERATURE DEVICE */ + chip_sensor_device = esp_rmaker_temp_sensor_device_create("Chip Temperature", NULL, app_get_internal_temperature()); + esp_rmaker_node_add_device(node, chip_sensor_device); /* Enable OTA */ esp_rmaker_ota_enable_default(); diff --git a/ESP32-Rainmaker-Switch/main/app_priv.h b/ESP32-Rainmaker-Switch/main/app_priv.h index 407320a0..75718276 100644 --- a/ESP32-Rainmaker-Switch/main/app_priv.h +++ b/ESP32-Rainmaker-Switch/main/app_priv.h @@ -18,6 +18,7 @@ extern esp_rmaker_device_t *switch_device; // Define RainMaker device: temperature gauge extern esp_rmaker_device_t *light_gauge_device; extern esp_rmaker_device_t *temp_sensor_device; +extern esp_rmaker_device_t *chip_sensor_device; // internal temperature sensor void app_driver_init(void); void app_sensor_init(void);