ESPHome  2022.11.3
homeassistant_time.h
Go to the documentation of this file.
1 #pragma once
2 
6 
7 namespace esphome {
8 namespace 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 
19 extern 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...
HomeassistantTime * global_homeassistant_time
Definition: a4988.cpp:4
void synchronize_epoch_(uint32_t epoch)
Report a unix epoch as current time.