ESPHome 2025.7.1
Loading...
Searching...
No Matches
esphome::ota::OTAComponent::StateCallbackManager Class Reference

Extended callback manager with deferred call support. More...

#include <ota_backend.h>

Inheritance diagram for esphome::ota::OTAComponent::StateCallbackManager:
esphome::CallbackManager< void(OTAState, float, uint8_t)>

Public Member Functions

 StateCallbackManager (OTAComponent *component)
 
void call_deferred (ota::OTAState state, float progress, uint8_t error)
 Call callbacks with deferral to main loop (for thread safety).
 

Detailed Description

Extended callback manager with deferred call support.

This adds a call_deferred() method for thread-safe execution from other tasks.

Definition at line 74 of file ota_backend.h.

Constructor & Destructor Documentation

◆ StateCallbackManager()

esphome::ota::OTAComponent::StateCallbackManager::StateCallbackManager ( OTAComponent * component)
inline

Definition at line 76 of file ota_backend.h.

Member Function Documentation

◆ call_deferred()

void esphome::ota::OTAComponent::StateCallbackManager::call_deferred ( ota::OTAState state,
float progress,
uint8_t error )
inline

Call callbacks with deferral to main loop (for thread safety).

This should be used by OTA implementations that run in separate tasks (like web_server OTA) to ensure callbacks execute in the main loop.

Definition at line 83 of file ota_backend.h.


The documentation for this class was generated from the following file: