ESPHome 2026.1.0-dev
Loading...
Searching...
No Matches
esphome::ota::OTAGlobalCallback Class Reference

Global callback that aggregates OTA state from all OTA components. More...

#include <ota_backend.h>

Public Member Functions

void add_global_state_listener (OTAGlobalStateListener *listener)
 
void notify_ota_state (OTAState state, float progress, uint8_t error, OTAComponent *component)
 

Protected Attributes

std::vector< OTAGlobalStateListener * > global_listeners_
 

Detailed Description

Global callback that aggregates OTA state from all OTA components.

OTA components call notify_ota_state() directly with their pointer, which forwards the event to all registered global listeners.

Definition at line 112 of file ota_backend.h.

Member Function Documentation

◆ add_global_state_listener()

void esphome::ota::OTAGlobalCallback::add_global_state_listener ( OTAGlobalStateListener * listener)
inline

Definition at line 114 of file ota_backend.h.

◆ notify_ota_state()

void esphome::ota::OTAGlobalCallback::notify_ota_state ( OTAState state,
float progress,
uint8_t error,
OTAComponent * component )
inline

Definition at line 116 of file ota_backend.h.

Field Documentation

◆ global_listeners_

std::vector<OTAGlobalStateListener *> esphome::ota::OTAGlobalCallback::global_listeners_
protected

Definition at line 123 of file ota_backend.h.


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