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
+2 -1
View File
@@ -14,9 +14,10 @@ void DS1307Component::setup() {
if (!this->read_rtc_()) {
this->mark_failed();
}
this->set_interval(15 * 60 * 1000, [&]() { this->read(); });
}
void DS1307Component::update() { this->read(); }
void DS1307Component::dump_config() {
ESP_LOGCONFIG(TAG, "DS1307:");
LOG_I2C_DEVICE(this);