57 bool check(Ts...
x)
override {
return this->parent_->now().is_valid(); }
ESPTime now()
Get the time in the currently defined timezone.
TimeHasTimeCondition(RealTimeClock *parent)
static ESPTime from_epoch_utc(time_t epoch)
Convert an UTC epoch timestamp to a UTC time ESPTime instance.
bool check(Ts... x) override
The RealTimeClock class exposes common timekeeping functions via the device's local real-time clock...
A more user-friendly version of struct tm from time.h.
std::string get_timezone()
Get the time zone currently in use.
void add_on_time_sync_callback(std::function< void()> callback)
This class simplifies creating components that periodically check a state.
void set_timezone(const std::string &tz)
Set the time zone.
CallbackManager< void()> time_sync_callback_
static ESPTime from_epoch_local(time_t epoch)
Convert an UTC epoch timestamp to a local time ESPTime instance.
Base class for all automation conditions.
time_t timestamp_now()
Get the current time as the UTC epoch since January 1st 1970.
ESPTime utcnow()
Get the time without any time zone or DST corrections.
Implementation of SPI Controller mode.
void synchronize_epoch_(uint32_t epoch)
Report a unix epoch as current time.
void call_setup() override