mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 23:48:11 +01:00
Update real_time_clock.h
This commit is contained in:
parent
bacec4fb37
commit
3a61204a17
1 changed files with 3 additions and 2 deletions
|
@ -23,6 +23,9 @@ class RealTimeClock : public PollingComponent {
|
||||||
/// Set the time zone.
|
/// Set the time zone.
|
||||||
void set_timezone(const std::string &tz) { this->timezone_ = tz; }
|
void set_timezone(const std::string &tz) { this->timezone_ = tz; }
|
||||||
|
|
||||||
|
// Apply the time zone.
|
||||||
|
void apply_timezone() { this->apply_timezone_(); }
|
||||||
|
|
||||||
/// Get the time zone currently in use.
|
/// Get the time zone currently in use.
|
||||||
std::string get_timezone() { return this->timezone_; }
|
std::string get_timezone() { return this->timezone_; }
|
||||||
|
|
||||||
|
@ -37,8 +40,6 @@ class RealTimeClock : public PollingComponent {
|
||||||
|
|
||||||
void call_setup() override;
|
void call_setup() override;
|
||||||
|
|
||||||
void apply_timezone() { this->apply_timezone_(); }
|
|
||||||
|
|
||||||
void add_on_time_sync_callback(std::function<void()> callback) {
|
void add_on_time_sync_callback(std::function<void()> callback) {
|
||||||
this->time_sync_callback_.add(std::move(callback));
|
this->time_sync_callback_.add(std::move(callback));
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue