ESPHome  2024.6.1
Public Member Functions | Protected Member Functions | Protected Attributes
esphome::datetime::DateCall Class Reference

#include <date_entity.h>

Public Member Functions

 DateCall (DateEntity *parent)
 
void perform ()
 
DateCallset_date (uint16_t year, uint8_t month, uint8_t day)
 
DateCallset_date (ESPTime time)
 
DateCallset_date (const std::string &date)
 
DateCallset_year (uint16_t year)
 
DateCallset_month (uint8_t month)
 
DateCallset_day (uint8_t day)
 
optional< uint16_t > get_year () const
 
optional< uint8_t > get_month () const
 
optional< uint8_t > get_day () const
 

Protected Member Functions

void validate_ ()
 

Protected Attributes

DateEntityparent_
 
optional< int16_t > year_
 
optional< uint8_t > month_
 
optional< uint8_t > day_
 

Detailed Description

Definition at line 65 of file date_entity.h.

Constructor & Destructor Documentation

◆ DateCall()

esphome::datetime::DateCall::DateCall ( DateEntity parent)
inlineexplicit

Definition at line 67 of file date_entity.h.

Member Function Documentation

◆ get_day()

optional<uint8_t> esphome::datetime::DateCall::get_day ( ) const
inline

Definition at line 88 of file date_entity.h.

◆ get_month()

optional<uint8_t> esphome::datetime::DateCall::get_month ( ) const
inline

Definition at line 87 of file date_entity.h.

◆ get_year()

optional<uint16_t> esphome::datetime::DateCall::get_year ( ) const
inline

Definition at line 86 of file date_entity.h.

◆ perform()

void esphome::datetime::DateCall::perform ( )

Definition at line 81 of file date_entity.cpp.

◆ set_date() [1/3]

DateCall & esphome::datetime::DateCall::set_date ( uint16_t  year,
uint8_t  month,
uint8_t  day 
)

Definition at line 97 of file date_entity.cpp.

◆ set_date() [2/3]

DateCall & esphome::datetime::DateCall::set_date ( ESPTime  time)

Definition at line 104 of file date_entity.cpp.

◆ set_date() [3/3]

DateCall & esphome::datetime::DateCall::set_date ( const std::string &  date)

Definition at line 106 of file date_entity.cpp.

◆ set_day()

DateCall& esphome::datetime::DateCall::set_day ( uint8_t  day)
inline

Definition at line 81 of file date_entity.h.

◆ set_month()

DateCall& esphome::datetime::DateCall::set_month ( uint8_t  month)
inline

Definition at line 77 of file date_entity.h.

◆ set_year()

DateCall& esphome::datetime::DateCall::set_year ( uint16_t  year)
inline

Definition at line 73 of file date_entity.h.

◆ validate_()

void esphome::datetime::DateCall::validate_ ( )
protected

Definition at line 39 of file date_entity.cpp.

Field Documentation

◆ day_

optional<uint8_t> esphome::datetime::DateCall::day_
protected

Definition at line 97 of file date_entity.h.

◆ month_

optional<uint8_t> esphome::datetime::DateCall::month_
protected

Definition at line 96 of file date_entity.h.

◆ parent_

DateEntity* esphome::datetime::DateCall::parent_
protected

Definition at line 93 of file date_entity.h.

◆ year_

optional<int16_t> esphome::datetime::DateCall::year_
protected

Definition at line 95 of file date_entity.h.


The documentation for this class was generated from the following files: