mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-05 20:38:27 +02:00
tuya: add time sync callback only once to prevent memleak (#5234)
This commit is contained in:
committed by
Jesse Hills
parent
f26238e824
commit
3a899e28dc
@@ -130,6 +130,7 @@ class Tuya : public Component, public uart::UARTDevice {
|
||||
#ifdef USE_TIME
|
||||
void send_local_time_();
|
||||
optional<time::RealTimeClock *> time_id_{};
|
||||
bool time_sync_callback_registered_{false};
|
||||
#endif
|
||||
TuyaInitState init_state_ = TuyaInitState::INIT_HEARTBEAT;
|
||||
bool init_failed_{false};
|
||||
|
||||
Reference in New Issue
Block a user