mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-01 02:28:28 +02:00
make time components polling components (#1443)
* make real time clock components polling components * add test
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user