5#ifdef USE_DATETIME_DATE
15#define LOG_DATETIME_DATE(prefix, type, obj) \
16 if (log_entity_header(TAG, prefix, LOG_STR_LITERAL(type), (obj))) { \
17 LOG_ENTITY_ICON(TAG, prefix, *(obj)); \
DateCall & set_date(uint16_t year, uint8_t month, uint8_t day)
optional< uint16_t > year_
optional< uint8_t > month_
DateCall & set_date(const char *date)
DateCall(DateEntity *parent)
optional< uint8_t > get_month() const
DateCall & set_month(uint8_t month)
DateCall & set_date(const std::string &date)
optional< uint8_t > get_day() const
DateCall & set_day(uint8_t day)
optional< uint16_t > get_year() const
DateCall & set_year(uint16_t year)
ESPTime state_as_esptime() const override
virtual void control(const DateCall &call)=0
esphome::datetime::DateEntity __attribute__
A more user-friendly version of struct tm from time.h.
uint8_t day_of_month
day of the month [1-31]
uint8_t month
month; january=1 [1-12]
DateCall to_call(DateEntity *date)
void apply(DateEntity *date)