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:
@@ -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;
|
||||
|
@@ -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:
|
||||
|
Reference in New Issue
Block a user