ESPHome 2026.3.0-dev
Loading...
Searching...
No Matches
zigbee_time_zephyr.h
Go to the documentation of this file.
1#pragma once
3#if defined(USE_ZIGBEE) && defined(USE_NRF52) && defined(USE_TIME)
7
8extern "C" {
9#include <zboss_api.h>
10#include <zboss_api_addons.h>
11}
12
13namespace esphome::zigbee {
14
16 public:
17 void setup() override;
18 void dump_config() override;
19 void update() override;
20
21 void set_cluster_attributes(zb_zcl_time_attrs_t &cluster_attributes) {
22 this->cluster_attributes_ = &cluster_attributes;
23 }
24
25 void set_epoch_time(uint32_t epoch);
26
27 protected:
28 static void sync_time(zb_ret_t status, zb_uint32_t auth_level, zb_uint16_t short_addr, zb_uint8_t endpoint,
29 zb_uint32_t nw_time);
30 void zcl_device_cb_(zb_bufid_t bufid);
31 zb_zcl_time_attrs_t *cluster_attributes_{nullptr};
32
33 bool has_time_{false};
34};
35
36} // namespace esphome::zigbee
37
38#endif
The RealTimeClock class exposes common timekeeping functions via the device's local real-time clock.
void set_epoch_time(uint32_t epoch)
static void sync_time(zb_ret_t status, zb_uint32_t auth_level, zb_uint16_t short_addr, zb_uint8_t endpoint, zb_uint32_t nw_time)
void zcl_device_cb_(zb_bufid_t bufid)
void set_cluster_attributes(zb_zcl_time_attrs_t &cluster_attributes)
zb_zcl_time_attrs_t * cluster_attributes_