3 #ifdef USE_DATETIME_DATETIME 10 static const char *
const TAG =
"template.datetime";
13 if (this->
f_.has_value())
43 if (!this->
f_.has_value())
46 auto val = (*this->
f_)();
142 LOG_DATETIME_DATETIME(
"",
"Template DateTime",
this);
143 ESP_LOGCONFIG(TAG,
" Optimistic: %s", YESNO(this->
optimistic_));
144 LOG_UPDATE_INTERVAL(
this);
150 #endif // USE_DATETIME_DATETIME void apply(DateTimeEntity *datetime)
optional< uint16_t > get_year() const
optional< uint8_t > get_day() const
optional< uint8_t > get_second() const
A more user-friendly version of struct tm from time.h.
void trigger(Ts... x)
Inform the parent automation that the event has triggered.
void control(const datetime::DateTimeCall &call) override
optional< uint8_t > get_month() const
optional< uint8_t > get_hour() const
uint8_t second
seconds after the minute [0-60]
ESPPreferences * global_preferences
ESPPreferenceObject pref_
uint8_t minute
minutes after the hour [0-59]
void dump_config() override
virtual ESPPreferenceObject make_preference(size_t length, uint32_t type, bool in_flash)=0
Implementation of SPI Controller mode.
uint8_t month
month; january=1 [1-12]
optional< std::function< optional< ESPTime >)> > f_
uint8_t hour
hours since midnight [0-23]
Trigger< ESPTime > * set_trigger_
uint32_t get_object_id_hash()
uint8_t day_of_month
day of the month [1-31]
optional< uint8_t > get_minute() const