import esphome.codegen as cg time_based_ns = cg.esphome_ns.namespace("time_based")