1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-12 14:53:49 +01:00

make time components polling components (#1443)

* make real time clock components polling components

* add test
This commit is contained in:
Florian Mösch
2021-01-12 19:37:22 +01:00
committed by GitHub
parent fbc1b3e316
commit bf453ad8cd
12 changed files with 20 additions and 21 deletions

View File

@@ -42,6 +42,7 @@ void SNTPComponent::dump_config() {
ESP_LOGCONFIG(TAG, " Server 3: '%s'", this->server_3_.c_str());
ESP_LOGCONFIG(TAG, " Timezone: '%s'", this->timezone_.c_str());
}
void SNTPComponent::update() {}
void SNTPComponent::loop() {
if (this->has_time_)
return;

View File

@@ -24,6 +24,7 @@ class SNTPComponent : public time::RealTimeClock {
}
float get_setup_priority() const override { return setup_priority::AFTER_WIFI; }
void update() override;
void loop() override;
protected: