From 71302456858d324c34b79264cbfa161b609ab84c Mon Sep 17 00:00:00 2001 From: Rebbe Pod <66928914+RebbePod@users.noreply.github.com> Date: Thu, 22 Aug 2024 00:20:42 -0400 Subject: [PATCH] Update real_time_clock.h --- esphome/components/time/real_time_clock.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/esphome/components/time/real_time_clock.h b/esphome/components/time/real_time_clock.h index a17168ae6f..4dea7f768b 100644 --- a/esphome/components/time/real_time_clock.h +++ b/esphome/components/time/real_time_clock.h @@ -23,6 +23,8 @@ class RealTimeClock : public PollingComponent { /// Set the time zone. void set_timezone(const std::string &tz) { this->timezone_ = tz; } + void set_time(uint32_t epoch) { this->synchronize_epoch_(epoch); } + /// Get the time zone currently in use. std::string get_timezone() { return this->timezone_; }