mirror of
https://github.com/esphome/esphome.git
synced 2025-11-17 15:26:01 +00:00
[nrf52,pcf8563] fix build error (#11846)
Co-authored-by: J. Nick Koston <nick@home-assistant.io> Co-authored-by: J. Nick Koston <nick+github@koston.org>
This commit is contained in:
@@ -23,7 +23,7 @@ void DS1307Component::dump_config() {
|
|||||||
if (this->is_failed()) {
|
if (this->is_failed()) {
|
||||||
ESP_LOGE(TAG, ESP_LOG_MSG_COMM_FAIL);
|
ESP_LOGE(TAG, ESP_LOG_MSG_COMM_FAIL);
|
||||||
}
|
}
|
||||||
ESP_LOGCONFIG(TAG, " Timezone: '%s'", this->timezone_.c_str());
|
RealTimeClock::dump_config();
|
||||||
}
|
}
|
||||||
|
|
||||||
float DS1307Component::get_setup_priority() const { return setup_priority::DATA; }
|
float DS1307Component::get_setup_priority() const { return setup_priority::DATA; }
|
||||||
|
|||||||
@@ -7,10 +7,8 @@ namespace homeassistant {
|
|||||||
static const char *const TAG = "homeassistant.time";
|
static const char *const TAG = "homeassistant.time";
|
||||||
|
|
||||||
void HomeassistantTime::dump_config() {
|
void HomeassistantTime::dump_config() {
|
||||||
ESP_LOGCONFIG(TAG,
|
ESP_LOGCONFIG(TAG, "Home Assistant Time");
|
||||||
"Home Assistant Time:\n"
|
RealTimeClock::dump_config();
|
||||||
" Timezone: '%s'",
|
|
||||||
this->timezone_.c_str());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
float HomeassistantTime::get_setup_priority() const { return setup_priority::DATA; }
|
float HomeassistantTime::get_setup_priority() const { return setup_priority::DATA; }
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ void PCF85063Component::dump_config() {
|
|||||||
if (this->is_failed()) {
|
if (this->is_failed()) {
|
||||||
ESP_LOGE(TAG, ESP_LOG_MSG_COMM_FAIL);
|
ESP_LOGE(TAG, ESP_LOG_MSG_COMM_FAIL);
|
||||||
}
|
}
|
||||||
ESP_LOGCONFIG(TAG, " Timezone: '%s'", this->timezone_.c_str());
|
RealTimeClock::dump_config();
|
||||||
}
|
}
|
||||||
|
|
||||||
float PCF85063Component::get_setup_priority() const { return setup_priority::DATA; }
|
float PCF85063Component::get_setup_priority() const { return setup_priority::DATA; }
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ void PCF8563Component::dump_config() {
|
|||||||
if (this->is_failed()) {
|
if (this->is_failed()) {
|
||||||
ESP_LOGE(TAG, ESP_LOG_MSG_COMM_FAIL);
|
ESP_LOGE(TAG, ESP_LOG_MSG_COMM_FAIL);
|
||||||
}
|
}
|
||||||
ESP_LOGCONFIG(TAG, " Timezone: '%s'", this->timezone_.c_str());
|
RealTimeClock::dump_config();
|
||||||
}
|
}
|
||||||
|
|
||||||
float PCF8563Component::get_setup_priority() const { return setup_priority::DATA; }
|
float PCF8563Component::get_setup_priority() const { return setup_priority::DATA; }
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ void RX8130Component::update() { this->read_time(); }
|
|||||||
void RX8130Component::dump_config() {
|
void RX8130Component::dump_config() {
|
||||||
ESP_LOGCONFIG(TAG, "RX8130:");
|
ESP_LOGCONFIG(TAG, "RX8130:");
|
||||||
LOG_I2C_DEVICE(this);
|
LOG_I2C_DEVICE(this);
|
||||||
|
RealTimeClock::dump_config();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RX8130Component::read_time() {
|
void RX8130Component::read_time() {
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ void SNTPComponent::dump_config() {
|
|||||||
for (auto &server : this->servers_) {
|
for (auto &server : this->servers_) {
|
||||||
ESP_LOGCONFIG(TAG, " Server %zu: '%s'", i++, server);
|
ESP_LOGCONFIG(TAG, " Server %zu: '%s'", i++, server);
|
||||||
}
|
}
|
||||||
|
RealTimeClock::dump_config();
|
||||||
}
|
}
|
||||||
void SNTPComponent::update() {
|
void SNTPComponent::update() {
|
||||||
#if !defined(USE_ESP32)
|
#if !defined(USE_ESP32)
|
||||||
|
|||||||
@@ -23,6 +23,13 @@ namespace time {
|
|||||||
static const char *const TAG = "time";
|
static const char *const TAG = "time";
|
||||||
|
|
||||||
RealTimeClock::RealTimeClock() = default;
|
RealTimeClock::RealTimeClock() = default;
|
||||||
|
|
||||||
|
void RealTimeClock::dump_config() {
|
||||||
|
#ifdef USE_TIME_TIMEZONE
|
||||||
|
ESP_LOGCONFIG(TAG, "Timezone: '%s'", this->timezone_.c_str());
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void RealTimeClock::synchronize_epoch_(uint32_t epoch) {
|
void RealTimeClock::synchronize_epoch_(uint32_t epoch) {
|
||||||
ESP_LOGVV(TAG, "Got epoch %" PRIu32, epoch);
|
ESP_LOGVV(TAG, "Got epoch %" PRIu32, epoch);
|
||||||
// Update UTC epoch time.
|
// Update UTC epoch time.
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ class RealTimeClock : public PollingComponent {
|
|||||||
this->time_sync_callback_.add(std::move(callback));
|
this->time_sync_callback_.add(std::move(callback));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void dump_config() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/// Report a unix epoch as current time.
|
/// Report a unix epoch as current time.
|
||||||
void synchronize_epoch_(uint32_t epoch);
|
void synchronize_epoch_(uint32_t epoch);
|
||||||
|
|||||||
4
tests/components/ds1307/test.nrf52-adafruit.yaml
Normal file
4
tests/components/ds1307/test.nrf52-adafruit.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
packages:
|
||||||
|
i2c: !include ../../test_build_components/common/i2c/nrf52.yaml
|
||||||
|
|
||||||
|
<<: !include common.yaml
|
||||||
4
tests/components/pcf85063/test.nrf52-adafruit.yaml
Normal file
4
tests/components/pcf85063/test.nrf52-adafruit.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
packages:
|
||||||
|
i2c: !include ../../test_build_components/common/i2c/nrf52.yaml
|
||||||
|
|
||||||
|
<<: !include common.yaml
|
||||||
4
tests/components/pcf8563/test.nrf52-adafruit.yaml
Normal file
4
tests/components/pcf8563/test.nrf52-adafruit.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
packages:
|
||||||
|
i2c: !include ../../test_build_components/common/i2c/nrf52.yaml
|
||||||
|
|
||||||
|
<<: !include common.yaml
|
||||||
4
tests/components/rx8130/test.nrf52-adafruit.yaml
Normal file
4
tests/components/rx8130/test.nrf52-adafruit.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
packages:
|
||||||
|
i2c: !include ../../test_build_components/common/i2c/nrf52.yaml
|
||||||
|
|
||||||
|
<<: !include common.yaml
|
||||||
Reference in New Issue
Block a user