3 #ifdef USE_DATETIME_TIME 10 static const char *
const TAG =
"template.time";
13 if (this->
f_.has_value())
40 if (!this->
f_.has_value())
43 auto val = (*this->
f_)();
103 LOG_DATETIME_TIME(
"",
"Template Time",
this);
104 ESP_LOGCONFIG(TAG,
" Optimistic: %s", YESNO(this->
optimistic_));
105 LOG_UPDATE_INTERVAL(
this);
111 #endif // USE_DATETIME_TIME optional< uint8_t > get_hour() const
ESPPreferenceObject pref_
A more user-friendly version of struct tm from time.h.
optional< std::function< optional< ESPTime >)> > f_
void apply(TimeEntity *time)
void trigger(Ts... x)
Inform the parent automation that the event has triggered.
void dump_config() override
uint8_t second
seconds after the minute [0-60]
ESPPreferences * global_preferences
uint8_t minute
minutes after the hour [0-59]
optional< uint8_t > get_minute() const
virtual ESPPreferenceObject make_preference(size_t length, uint32_t type, bool in_flash)=0
optional< uint8_t > get_second() const
Implementation of SPI Controller mode.
uint8_t hour
hours since midnight [0-23]
Trigger< ESPTime > * set_trigger_
uint32_t get_object_id_hash()
void control(const datetime::TimeCall &call) override