ESPHome 2026.3.0-dev
Loading...
Searching...
No Matches
esphome::setup_priority Namespace Reference

Default setup priorities for components of different types. More...

Variables

constexpr float BUS = 1000.0f
 For communication buses like i2c/spi.
 
constexpr float IO = 900.0f
 For components that represent GPIO pins like PCF8573.
 
constexpr float HARDWARE = 800.0f
 For components that deal with hardware and are very important like GPIO switch.
 
constexpr float DATA = 600.0f
 For components that import data from directly connected sensors like DHT.
 
constexpr float PROCESSOR = 400.0f
 For components that use data from sensors like displays.
 
constexpr float BLUETOOTH = 350.0f
 
constexpr float AFTER_BLUETOOTH = 300.0f
 
constexpr float WIFI = 250.0f
 
constexpr float ETHERNET = 250.0f
 
constexpr float BEFORE_CONNECTION = 220.0f
 For components that should be initialized after WiFi and before API is connected.
 
constexpr float AFTER_WIFI = 200.0f
 For components that should be initialized after WiFi is connected.
 
constexpr float AFTER_CONNECTION = 100.0f
 For components that should be initialized after a data connection (API/MQTT) is connected.
 
constexpr float LATE = -100.0f
 For components that should be initialized at the very end of the setup process.
 

Detailed Description

Default setup priorities for components of different types.

Components should return one of these setup priorities in get_setup_priority.

Variable Documentation

◆ AFTER_BLUETOOTH

float esphome::setup_priority::AFTER_BLUETOOTH = 300.0f
inlineconstexpr

Definition at line 35 of file component.h.

◆ AFTER_CONNECTION

float esphome::setup_priority::AFTER_CONNECTION = 100.0f
inlineconstexpr

For components that should be initialized after a data connection (API/MQTT) is connected.

Definition at line 43 of file component.h.

◆ AFTER_WIFI

float esphome::setup_priority::AFTER_WIFI = 200.0f
inlineconstexpr

For components that should be initialized after WiFi is connected.

Definition at line 41 of file component.h.

◆ BEFORE_CONNECTION

float esphome::setup_priority::BEFORE_CONNECTION = 220.0f
inlineconstexpr

For components that should be initialized after WiFi and before API is connected.

Definition at line 39 of file component.h.

◆ BLUETOOTH

float esphome::setup_priority::BLUETOOTH = 350.0f
inlineconstexpr

Definition at line 34 of file component.h.

◆ BUS

float esphome::setup_priority::BUS = 1000.0f
inlineconstexpr

For communication buses like i2c/spi.

Definition at line 25 of file component.h.

◆ DATA

float esphome::setup_priority::DATA = 600.0f
inlineconstexpr

For components that import data from directly connected sensors like DHT.

Definition at line 31 of file component.h.

◆ ETHERNET

float esphome::setup_priority::ETHERNET = 250.0f
inlineconstexpr

Definition at line 37 of file component.h.

◆ HARDWARE

float esphome::setup_priority::HARDWARE = 800.0f
inlineconstexpr

For components that deal with hardware and are very important like GPIO switch.

Definition at line 29 of file component.h.

◆ IO

float esphome::setup_priority::IO = 900.0f
inlineconstexpr

For components that represent GPIO pins like PCF8573.

Definition at line 27 of file component.h.

◆ LATE

float esphome::setup_priority::LATE = -100.0f
inlineconstexpr

For components that should be initialized at the very end of the setup process.

Definition at line 45 of file component.h.

◆ PROCESSOR

float esphome::setup_priority::PROCESSOR = 400.0f
inlineconstexpr

For components that use data from sensors like displays.

Definition at line 33 of file component.h.

◆ WIFI

float esphome::setup_priority::WIFI = 250.0f
inlineconstexpr

Definition at line 36 of file component.h.