ESPHome  2024.11.2
Public Member Functions | Protected Member Functions | Protected Attributes
esphome::datetime::DateTimeCall Class Reference

#include <datetime_entity.h>

Public Member Functions

 DateTimeCall (DateTimeEntity *parent)
 
void perform ()
 
DateTimeCallset_datetime (uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second)
 
DateTimeCallset_datetime (ESPTime datetime)
 
DateTimeCallset_datetime (const std::string &datetime)
 
DateTimeCallset_datetime (time_t epoch_seconds)
 
DateTimeCallset_year (uint16_t year)
 
DateTimeCallset_month (uint8_t month)
 
DateTimeCallset_day (uint8_t day)
 
DateTimeCallset_hour (uint8_t hour)
 
DateTimeCallset_minute (uint8_t minute)
 
DateTimeCallset_second (uint8_t second)
 
optional< uint16_t > get_year () const
 
optional< uint8_t > get_month () const
 
optional< uint8_t > get_day () const
 
optional< uint8_t > get_hour () const
 
optional< uint8_t > get_minute () const
 
optional< uint8_t > get_second () const
 

Protected Member Functions

void validate_ ()
 

Protected Attributes

DateTimeEntityparent_
 
optional< uint16_t > year_
 
optional< uint8_t > month_
 
optional< uint8_t > day_
 
optional< uint8_t > hour_
 
optional< uint8_t > minute_
 
optional< uint8_t > second_
 

Detailed Description

Definition at line 69 of file datetime_entity.h.

Constructor & Destructor Documentation

◆ DateTimeCall()

esphome::datetime::DateTimeCall::DateTimeCall ( DateTimeEntity parent)
inlineexplicit

Definition at line 71 of file datetime_entity.h.

Member Function Documentation

◆ get_day()

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

Definition at line 105 of file datetime_entity.h.

◆ get_hour()

optional<uint8_t> esphome::datetime::DateTimeCall::get_hour ( ) const
inline

Definition at line 106 of file datetime_entity.h.

◆ get_minute()

optional<uint8_t> esphome::datetime::DateTimeCall::get_minute ( ) const
inline

Definition at line 107 of file datetime_entity.h.

◆ get_month()

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

Definition at line 104 of file datetime_entity.h.

◆ get_second()

optional<uint8_t> esphome::datetime::DateTimeCall::get_second ( ) const
inline

Definition at line 108 of file datetime_entity.h.

◆ get_year()

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

Definition at line 103 of file datetime_entity.h.

◆ perform()

void esphome::datetime::DateTimeCall::perform ( )

Definition at line 124 of file datetime_entity.cpp.

◆ set_datetime() [1/4]

DateTimeCall & esphome::datetime::DateTimeCall::set_datetime ( uint16_t  year,
uint8_t  month,
uint8_t  day,
uint8_t  hour,
uint8_t  minute,
uint8_t  second 
)

Definition at line 149 of file datetime_entity.cpp.

◆ set_datetime() [2/4]

DateTimeCall & esphome::datetime::DateTimeCall::set_datetime ( ESPTime  datetime)

Definition at line 160 of file datetime_entity.cpp.

◆ set_datetime() [3/4]

DateTimeCall & esphome::datetime::DateTimeCall::set_datetime ( const std::string &  datetime)

Definition at line 165 of file datetime_entity.cpp.

◆ set_datetime() [4/4]

DateTimeCall & esphome::datetime::DateTimeCall::set_datetime ( time_t  epoch_seconds)

Definition at line 174 of file datetime_entity.cpp.

◆ set_day()

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

Definition at line 86 of file datetime_entity.h.

◆ set_hour()

DateTimeCall& esphome::datetime::DateTimeCall::set_hour ( uint8_t  hour)
inline

Definition at line 90 of file datetime_entity.h.

◆ set_minute()

DateTimeCall& esphome::datetime::DateTimeCall::set_minute ( uint8_t  minute)
inline

Definition at line 94 of file datetime_entity.h.

◆ set_month()

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

Definition at line 82 of file datetime_entity.h.

◆ set_second()

DateTimeCall& esphome::datetime::DateTimeCall::set_second ( uint8_t  second)
inline

Definition at line 98 of file datetime_entity.h.

◆ set_year()

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

Definition at line 78 of file datetime_entity.h.

◆ validate_()

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

Definition at line 69 of file datetime_entity.cpp.

Field Documentation

◆ day_

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

Definition at line 117 of file datetime_entity.h.

◆ hour_

optional<uint8_t> esphome::datetime::DateTimeCall::hour_
protected

Definition at line 118 of file datetime_entity.h.

◆ minute_

optional<uint8_t> esphome::datetime::DateTimeCall::minute_
protected

Definition at line 119 of file datetime_entity.h.

◆ month_

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

Definition at line 116 of file datetime_entity.h.

◆ parent_

DateTimeEntity* esphome::datetime::DateTimeCall::parent_
protected

Definition at line 113 of file datetime_entity.h.

◆ second_

optional<uint8_t> esphome::datetime::DateTimeCall::second_
protected

Definition at line 120 of file datetime_entity.h.

◆ year_

optional<uint16_t> esphome::datetime::DateTimeCall::year_
protected

Definition at line 115 of file datetime_entity.h.


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