mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 17:05:36 +00:00
Merge remote-tracking branch 'upstream/preferences-compile-out-loop' into integration
This commit is contained in:
@@ -22,7 +22,7 @@ CONFIG_SCHEMA = cv.Schema(
|
||||
async def to_code(config):
|
||||
var = cg.new_Pvariable(config[CONF_ID])
|
||||
write_interval = config[CONF_FLASH_WRITE_INTERVAL]
|
||||
if write_interval == 0:
|
||||
if write_interval.total_milliseconds == 0:
|
||||
cg.add_define("USE_PREFERENCES_SYNC_EVERY_LOOP")
|
||||
else:
|
||||
cg.add(var.set_write_interval(write_interval))
|
||||
|
||||
Reference in New Issue
Block a user