ESPHome 2025.7.4
Loading...
Searching...
No Matches
component.cpp File Reference

Go to the source code of this file.

Namespaces

namespace  esphome
 Providing packet encoding functions for exchanging data with a remote host.
 
namespace  esphome::setup_priority
 Default setup priorities for components of different types.
 

Functions

void esphome::clear_setup_priority_overrides ()
 

Variables

const float esphome::setup_priority::BUS = 1000.0f
 For communication buses like i2c/spi.
 
const float esphome::setup_priority::IO = 900.0f
 For components that represent GPIO pins like PCF8573.
 
const float esphome::setup_priority::HARDWARE = 800.0f
 For components that deal with hardware and are very important like GPIO switch.
 
const float esphome::setup_priority::DATA = 600.0f
 For components that import data from directly connected sensors like DHT.
 
const float esphome::setup_priority::PROCESSOR = 400.0
 For components that use data from sensors like displays.
 
const float esphome::setup_priority::BLUETOOTH = 350.0f
 
const float esphome::setup_priority::AFTER_BLUETOOTH = 300.0f
 
const float esphome::setup_priority::WIFI = 250.0f
 
const float esphome::setup_priority::ETHERNET = 250.0f
 
const float esphome::setup_priority::BEFORE_CONNECTION = 220.0f
 For components that should be initialized after WiFi and before API is connected.
 
const float esphome::setup_priority::AFTER_WIFI = 200.0f
 For components that should be initialized after WiFi is connected.
 
const float esphome::setup_priority::AFTER_CONNECTION = 100.0f
 For components that should be initialized after a data connection (API/MQTT) is connected.
 
const float esphome::setup_priority::LATE = -100.0f
 For components that should be initialized at the very end of the setup process.
 
const uint8_t esphome::COMPONENT_STATE_MASK = 0x07
 
const uint8_t esphome::COMPONENT_STATE_CONSTRUCTION = 0x00
 
const uint8_t esphome::COMPONENT_STATE_SETUP = 0x01
 
const uint8_t esphome::COMPONENT_STATE_LOOP = 0x02
 
const uint8_t esphome::COMPONENT_STATE_FAILED = 0x03
 
const uint8_t esphome::COMPONENT_STATE_LOOP_DONE = 0x04
 
const uint8_t esphome::STATUS_LED_MASK = 0x18
 
const uint8_t esphome::STATUS_LED_OK = 0x00
 
const uint8_t esphome::STATUS_LED_WARNING = 0x08
 
const uint8_t esphome::STATUS_LED_ERROR = 0x10
 
const uint16_t esphome::WARN_IF_BLOCKING_OVER_MS = 50U
 Initial blocking time allowed without warning.
 
const uint16_t esphome::WARN_IF_BLOCKING_INCREMENT_MS = 10U
 How long the blocking time must be larger to warn again.
 
uint32_t esphome::global_state = 0