ESPHome 2026.9.0-dev
Loading...
Searching...
No Matches
zigbee_time_esp32.h
Go to the documentation of this file.
1#pragma once
3#if defined(USE_ZIGBEE) && defined(USE_ESP32) && defined(USE_TIME)
4
7#include "../zigbee_esp32.h"
8
9namespace esphome::zigbee {
10
11class ZigbeeComponent;
12
13class ZigbeeTime final : public time::RealTimeClock {
14 public:
15 ZigbeeTime(ZigbeeComponent *parent, uint8_t ep) : parent_(parent), endpoint_(ep) {}
16 void setup() override;
17 void update() override;
18 void dump_config() override;
19 void set_epoch_time(uint32_t utc);
20
21 protected:
22 void register_zb_time_();
23 static void set_utc_time(uint32_t utc);
24 static uint32_t get_utc_time();
25 static void status_cb(ezb_err_t status);
26
28 uint8_t endpoint_;
29 uint8_t retry_count_{0};
30 bool registered_{false};
31};
32
33} // namespace esphome::zigbee
34#endif
static void status_cb(ezb_err_t status)
static void set_utc_time(uint32_t utc)
ZigbeeTime(ZigbeeComponent *parent, uint8_t ep)
static void uint32_t