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 -2
View File
@@ -22,7 +22,7 @@ CODEOWNERS = ['@OttoWinter']
IS_PLATFORM_COMPONENT = True
time_ns = cg.esphome_ns.namespace('time')
RealTimeClock = time_ns.class_('RealTimeClock', cg.Component)
RealTimeClock = time_ns.class_('RealTimeClock', cg.PollingComponent)
CronTrigger = time_ns.class_('CronTrigger', automation.Trigger.template(), cg.Component)
ESPTime = time_ns.struct('ESPTime')
TimeHasTimeCondition = time_ns.class_('TimeHasTimeCondition', Condition)
@@ -294,7 +294,7 @@ TIME_SCHEMA = cv.Schema({
cv.Optional(CONF_CRON): validate_cron_raw,
cv.Optional(CONF_AT): validate_time_at,
}, validate_cron_keys),
})
}).extend(cv.polling_component_schema('15min'))
@coroutine