diff --git a/esphome/components/emerald_ble/emerald_ble.cpp b/esphome/components/emerald_ble/emerald_ble.cpp index b7fd57d31ca8..a4a43498a9d7 100644 --- a/esphome/components/emerald_ble/emerald_ble.cpp +++ b/esphome/components/emerald_ble/emerald_ble.cpp @@ -1,6 +1,7 @@ #include "emerald_ble.h" #include "esphome/core/log.h" #include "esphome/core/hal.h" +#include "esphome/core/time.h" #ifdef USE_ESP32 @@ -103,8 +104,8 @@ void Emerald::decode_emerald_packet_(const uint8_t *data, uint16_t length) { // else, use the emerald measurement timestamps #ifdef USE_TIME auto *time_ = *this->time_; - time::ESPTime date_of_measurement = time_->now(); - // time::ESPTime date_of_measurement = this->time_->now(); + ESPTime date_of_measurement = time_->now(); + // ESPTime date_of_measurement = this->time_->now(); if (date_of_measurement.is_valid()) { if (this->day_of_last_measurement_ == 0) { this->day_of_last_measurement_ = date_of_measurement.day_of_year; } else if (this->day_of_last_measurement_ != date_of_measurement.day_of_year) {