ESPHome 2025.5.0
Loading...
Searching...
No Matches
homeassistant_time.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace esphome {
8namespace homeassistant {
9
11 public:
12 void setup() override;
13 void update() override;
14 void dump_config() override;
15 void set_epoch_time(uint32_t epoch) { this->synchronize_epoch_(epoch); }
16 float get_setup_priority() const override;
17};
18
19extern HomeassistantTime *global_homeassistant_time; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
20
21} // namespace homeassistant
22} // namespace esphome
The RealTimeClock class exposes common timekeeping functions via the device's local real-time clock.
void synchronize_epoch_(uint32_t epoch)
Report a unix epoch as current time.
HomeassistantTime * global_homeassistant_time
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7