ESPHome  2021.11.3
Public Member Functions | Protected Member Functions | Protected Attributes
esphome::Component Class Reference

#include <component.h>

Inheritance diagram for esphome::Component:
esphome::midea::ApplianceBase< dudanov::midea::ac::AirConditioner > esphome::a4988::A4988 esphome::ac_dimmer::AcDimmer esphome::ads1115::ADS1115Component esphome::am43::Am43Component esphome::api::APIServer esphome::as3935::AS3935Component esphome::atc_mithermometer::ATCMiThermometer esphome::b_parasite::BParasite esphome::bang_bang::BangBangClimate esphome::binary::BinaryFan esphome::binary_sensor::AutorepeatFilter esphome::binary_sensor::DelayedOffFilter esphome::binary_sensor::DelayedOnFilter esphome::binary_sensor::DelayedOnOffFilter esphome::binary_sensor::MultiClickTrigger esphome::binary_sensor_map::BinarySensorMap esphome::ble_client::BLEClient esphome::ble_client::BLEClientSwitch esphome::ble_presence::BLEPresenceDevice esphome::ble_rssi::BLERSSISensor esphome::ble_scanner::BLEScanner esphome::bme680_bsec::BME680BSECComponent esphome::canbus::Canbus esphome::canbus::CanbusTrigger esphome::cap1188::CAP1188Component esphome::captive_portal::CaptivePortal esphome::climate_ir::ClimateIR esphome::cs5460a::CS5460AComponent esphome::current_based::CurrentBasedCover esphome::custom::CustomBinarySensorConstructor esphome::custom::CustomSensorConstructor esphome::custom::CustomSwitchConstructor esphome::custom::CustomTextSensorConstructor esphome::debug::DebugComponent esphome::deep_sleep::DeepSleepComponent esphome::DelayAction< Ts > esphome::demo::DemoClimate esphome::demo::DemoCover esphome::demo::DemoFan esphome::demo::DemoLight esphome::demo::DemoNumber esphome::demo::DemoSwitch esphome::dfplayer::DFPlayer esphome::dsmr::Dsmr esphome::e131::E131Component esphome::endstop::EndstopCover esphome::esp32_ble::ESP32BLE esphome::esp32_ble_beacon::ESP32BLEBeacon esphome::esp32_ble_server::BLEServer esphome::esp32_ble_tracker::ESP32BLETracker esphome::esp32_camera::ESP32Camera esphome::esp32_camera_web_server::CameraWebServer esphome::esp32_dac::ESP32DAC esphome::esp32_improv::ESP32ImprovComponent esphome::esp32_touch::ESP32TouchComponent esphome::esp8266_pwm::ESP8266PWM esphome::ethernet::EthernetComponent esphome::fan::FanState esphome::ForCondition< Ts > esphome::globals::GlobalsComponent< T > esphome::globals::RestoringGlobalsComponent< T > esphome::gpio::GPIOBinaryOutput esphome::gpio::GPIOBinarySensor esphome::gpio::GPIOSwitch esphome::graph::Graph esphome::homeassistant::HomeassistantBinarySensor esphome::homeassistant::HomeassistantSensor esphome::homeassistant::HomeassistantTextSensor esphome::hrxl_maxsonar_wr::HrxlMaxsonarWrComponent esphome::http_request::HttpRequestComponent esphome::i2c::ArduinoI2CBus esphome::i2c::IDFI2CBus esphome::improv_serial::ImprovSerialComponent esphome::inkbird_ibsth1_mini::InkbirdIbstH1Mini esphome::integration::IntegrationSensor esphome::ledc::LEDCOutput esphome::light::AddressableLight esphome::light::LightState esphome::logger::Logger esphome::LoopTrigger esphome::mcp23016::MCP23016 esphome::mcp23xxx_base::MCP23XXXBase esphome::mcp3008::MCP3008 esphome::mcp4725::MCP4725 esphome::mdns::MDNSComponent esphome::midea::ApplianceBase< T > esphome::modbus::Modbus esphome::modbus_controller::ModbusBinarySensor esphome::modbus_controller::ModbusNumber esphome::modbus_controller::ModbusOutput esphome::modbus_controller::ModbusSensor esphome::modbus_controller::ModbusSwitch esphome::modbus_controller::ModbusTextSensor esphome::mpr121::MPR121Component esphome::mqtt::MQTTClientComponent esphome::mqtt::MQTTComponent esphome::mqtt::MQTTMessageTrigger esphome::mqtt_subscribe::MQTTSubscribeSensor esphome::mqtt_subscribe::MQTTSubscribeTextSensor esphome::my9231::MY9231OutputComponent esphome::ntc::NTC esphome::number::ValueRangeTrigger esphome::ota::OTAComponent esphome::output::OutputSwitch esphome::pca9685::PCA9685Output esphome::pcf8574::PCF8574Component esphome::pid::PIDClimate esphome::pid::PIDClimateSensor esphome::pipsolar::PipsolarSwitch esphome::pipsolar::PipsolarTextSensor esphome::pmsx003::PMSX003Component esphome::PollingComponent esphome::power_supply::PowerSupply esphome::preferences::IntervalSyncer esphome::prometheus::PrometheusHandler esphome::pulse_meter::PulseMeterSensor esphome::pvvx_mithermometer::PVVXMiThermometer esphome::rdm6300::RDM6300Component esphome::remote_base::RawTrigger esphome::remote_base::RemoteReceiverBinarySensorBase esphome::resistance::ResistanceSensor esphome::restart::RestartSwitch esphome::rf_bridge::RFBridgeComponent esphome::rotary_encoder::RotaryEncoderSensor esphome::rtttl::Rtttl esphome::ruuvitag::RuuviTag esphome::safe_mode::SafeModeSwitch esphome::scd30::SCD30Component esphome::script::QueueingScript esphome::script::ScriptWaitAction< Ts > esphome::sds011::SDS011Component esphome::sensor::DebounceFilter esphome::sensor::HeartbeatFilter esphome::sensor::ThrottleAverageFilter esphome::sensor::ValueRangeTrigger esphome::servo::Servo esphome::shutdown::ShutdownSwitch esphome::ShutdownTrigger esphome::slow_pwm::SlowPWMOutput esphome::sm16716::SM16716 esphome::sm2135::SM2135 esphome::sn74hc595::SN74HC595Component esphome::speed::SpeedFan esphome::spi::SPIComponent esphome::StartupTrigger esphome::status::StatusBinarySensor esphome::status_led::StatusLED esphome::status_led::StatusLEDLightOutput esphome::sx1509::SX1509Component esphome::sx1509::SX1509FloatOutputChannel esphome::tca9548a::TCA9548AComponent esphome::teleinfo::TeleInfoSensor esphome::teleinfo::TeleInfoTextSensor esphome::template_::TemplateBinarySensor esphome::template_::TemplateCover esphome::template_::TemplateSwitch esphome::thermostat::ThermostatClimate esphome::time::CronTrigger esphome::time::SyncTrigger esphome::time_based::TimeBasedCover esphome::tlc59208f::TLC59208FOutput esphome::tlc5947::TLC5947 esphome::tm1651::TM1651Display esphome::total_daily_energy::TotalDailyEnergy esphome::ttp229_bsf::TTP229BSFComponent esphome::ttp229_lsf::TTP229LSFComponent esphome::tuya::Tuya esphome::tuya::TuyaBinarySensor esphome::tuya::TuyaClimate esphome::tuya::TuyaCover esphome::tuya::TuyaFan esphome::tuya::TuyaLight esphome::tuya::TuyaSensor esphome::tuya::TuyaSwitch esphome::tx20::Tx20Component esphome::uart::ESP32ArduinoUARTComponent esphome::uart::ESP8266UartComponent esphome::uart::IDFUARTComponent esphome::uart::UARTDebugger esphome::uart::UARTDummyReceiver esphome::uart::UARTSwitch esphome::uln2003::ULN2003 esphome::version::VersionTextSensor esphome::WaitUntilAction< Ts > esphome::web_server::WebServer esphome::web_server_base::WebServerBase esphome::wifi::WiFiComponent esphome::wifi_info::BSSIDWiFiInfo esphome::wifi_info::IPAddressWiFiInfo esphome::wifi_info::MacAddressWifiInfo esphome::wifi_info::SSIDWiFiInfo esphome::xiaomi_cgd1::XiaomiCGD1 esphome::xiaomi_cgdk2::XiaomiCGDK2 esphome::xiaomi_cgg1::XiaomiCGG1 esphome::xiaomi_cgpr1::XiaomiCGPR1 esphome::xiaomi_gcls002::XiaomiGCLS002 esphome::xiaomi_hhccjcy01::XiaomiHHCCJCY01 esphome::xiaomi_hhccpot002::XiaomiHHCCPOT002 esphome::xiaomi_jqjcy01ym::XiaomiJQJCY01YM esphome::xiaomi_lywsd02::XiaomiLYWSD02 esphome::xiaomi_lywsd03mmc::XiaomiLYWSD03MMC esphome::xiaomi_lywsdcgq::XiaomiLYWSDCGQ esphome::xiaomi_mhoc401::XiaomiMHOC401 esphome::xiaomi_miscale::XiaomiMiscale esphome::xiaomi_mjyd02yla::XiaomiMJYD02YLA esphome::xiaomi_mue4094rt::XiaomiMUE4094RT esphome::xiaomi_wx08zm::XiaomiWX08ZM esphome::yashima::YashimaClimate

Public Member Functions

virtual void setup ()
 Where the component's initialization should happen. More...
 
virtual void loop ()
 This method will be called repeatedly. More...
 
virtual void dump_config ()
 
virtual float get_setup_priority () const
 priority of setup(). More...
 
float get_actual_setup_priority () const
 
void set_setup_priority (float priority)
 
virtual float get_loop_priority () const
 priority of loop(). More...
 
void call ()
 
virtual void on_shutdown ()
 
virtual void on_safe_shutdown ()
 
uint32_t get_component_state () const
 
virtual void mark_failed ()
 Mark this component as failed. More...
 
bool is_failed ()
 
virtual bool can_proceed ()
 
bool status_has_warning ()
 
bool status_has_error ()
 
void status_set_warning ()
 
void status_set_error ()
 
void status_clear_warning ()
 
void status_clear_error ()
 
void status_momentary_warning (const std::string &name, uint32_t length=5000)
 
void status_momentary_error (const std::string &name, uint32_t length=5000)
 
bool has_overridden_loop () const
 
void set_component_source (const char *source)
 Set where this component was loaded from for some debug messages. More...
 
const char * get_component_source () const
 Get the integration where this component was declared as a string. More...
 

Protected Member Functions

virtual void call_loop ()
 
virtual void call_setup ()
 
virtual void call_dump_config ()
 
void set_interval (const std::string &name, uint32_t interval, std::function< void()> &&f)
 Set an interval function with a unique name. More...
 
void set_interval (uint32_t interval, std::function< void()> &&f)
 
bool cancel_interval (const std::string &name)
 Cancel an interval function. More...
 
void set_timeout (uint32_t timeout, std::function< void()> &&f)
 
void set_timeout (const std::string &name, uint32_t timeout, std::function< void()> &&f)
 Set a timeout function with a unique name. More...
 
bool cancel_timeout (const std::string &name)
 Cancel a timeout function. More...
 
void defer (const std::string &name, std::function< void()> &&f)
 Defer a callback to the next loop() call. More...
 
void defer (std::function< void()> &&f)
 Defer a callback to the next loop() call. More...
 
bool cancel_defer (const std::string &name)
 Cancel a defer callback using the specified name, name must not be empty. More...
 

Protected Attributes

uint32_t component_state_ {0x0000}
 State of this component. More...
 
float setup_priority_override_ {NAN}
 
const char * component_source_ = nullptr
 

Detailed Description

Definition at line 64 of file component.h.

Member Function Documentation

◆ call()

void esphome::Component::call ( )

Definition at line 71 of file component.cpp.

◆ call_dump_config()

void esphome::Component::call_dump_config ( )
protectedvirtual

Reimplemented in esphome::mqtt::MQTTComponent.

Definition at line 68 of file component.cpp.

◆ call_loop()

void esphome::Component::call_loop ( )
protectedvirtual

Reimplemented in esphome::mqtt::MQTTComponent.

Definition at line 66 of file component.cpp.

◆ call_setup()

void esphome::Component::call_setup ( )
protectedvirtual

◆ can_proceed()

bool esphome::Component::can_proceed ( )
virtual

◆ cancel_defer()

bool esphome::Component::cancel_defer ( const std::string &  name)
protected

Cancel a defer callback using the specified name, name must not be empty.

Definition at line 111 of file component.cpp.

◆ cancel_interval()

bool esphome::Component::cancel_interval ( const std::string &  name)
protected

Cancel an interval function.

Parameters
nameThe identifier for this interval function.
Returns
Whether an interval functions was deleted.

Definition at line 54 of file component.cpp.

◆ cancel_timeout()

bool esphome::Component::cancel_timeout ( const std::string &  name)
protected

Cancel a timeout function.

Parameters
nameThe identifier for this timeout function.
Returns
Whether a timeout functions was deleted.

Definition at line 62 of file component.cpp.

◆ defer() [1/2]

void esphome::Component::defer ( const std::string &  name,
std::function< void()> &&  f 
)
protected

Defer a callback to the next loop() call.

If name is specified and a defer() object with the same name exists, the old one is first removed.

Parameters
nameThe name of the defer function.
fThe callback.

Definition at line 114 of file component.cpp.

◆ defer() [2/2]

void esphome::Component::defer ( std::function< void()> &&  f)
protected

Defer a callback to the next loop() call.

Definition at line 108 of file component.cpp.

◆ dump_config()

void esphome::Component::dump_config ( )
virtual

Reimplemented in esphome::nextion::Nextion, esphome::modbus_controller::ModbusController, esphome::waveshare_epaper::WaveshareEPaper2P13InDKE, esphome::waveshare_epaper::WaveshareEPaper7P5InV2, esphome::mqtt::MQTTMessageTrigger, esphome::waveshare_epaper::WaveshareEPaper7P5InBC, esphome::remote_base::RemoteReceiverBinarySensorBase, esphome::waveshare_epaper::WaveshareEPaper7P5In, esphome::waveshare_epaper::WaveshareEPaper5P8In, esphome::tsl2591::TSL2591Component, esphome::fastled_base::FastLEDLightOutput, esphome::waveshare_epaper::WaveshareEPaper4P2InBV2, esphome::wifi::WiFiComponent, esphome::mqtt::MQTTClientComponent, esphome::esp32_ble_tracker::ESP32BLETracker, esphome::waveshare_epaper::WaveshareEPaper4P2In, esphome::waveshare_epaper::WaveshareEPaper2P9InB, esphome::graph::Graph, esphome::waveshare_epaper::WaveshareEPaper2P7In, esphome::st7789v::ST7789V, esphome::bme680::BME680Component, esphome::wifi_info::MacAddressWifiInfo, esphome::ble_presence::BLEPresenceDevice, esphome::wifi_info::BSSIDWiFiInfo, esphome::fingerprint_grow::FingerprintGrowComponent, esphome::waveshare_epaper::WaveshareEPaperTypeA, esphome::ble_client::BLEClient, esphome::dfplayer::DFPlayer, esphome::havells_solar::HavellsSolar, esphome::rotary_encoder::RotaryEncoderSensor, esphome::spi::SPIComponent, esphome::bme280::BME280Component, esphome::cs5460a::CS5460AComponent, esphome::esp32_camera::ESP32Camera, esphome::max31856::MAX31856Sensor, esphome::tuya::Tuya, esphome::mpr121::MPR121Component, esphome::web_server::WebServer, esphome::dsmr::Dsmr, esphome::zyaura::ZyAuraSensor, esphome::inkplate6::Inkplate6, esphome::tsl2561::TSL2561Sensor, esphome::bmp280::BMP280Component, esphome::deep_sleep::DeepSleepComponent, esphome::wifi_info::SSIDWiFiInfo, esphome::ota::OTAComponent, esphome::pulse_counter::PulseCounterSensor, esphome::canbus::Canbus, esphome::xpt2046::XPT2046Component, esphome::bme680_bsec::BME680BSECComponent, esphome::logger::Logger, esphome::sdm_meter::SDMMeter, esphome::as3935::AS3935Component, esphome::ltr390::LTR390Component, esphome::tcs34725::TCS34725Component, esphome::ble_rssi::BLERSSISensor, esphome::uart::ESP8266UartComponent, esphome::ac_dimmer::AcDimmer, esphome::daly_bms::DalyBmsComponent, esphome::ruuvitag::RuuviTag, esphome::sgp40::SGP40Component, esphome::thermostat::ThermostatClimate, esphome::wifi_info::ScanResultsWiFiInfo, esphome::light::LightState, esphome::rf_bridge::RFBridgeComponent, esphome::cap1188::CAP1188Component, esphome::dht::DHT, esphome::pca9685::PCA9685Output, esphome::tlc59208f::TLC59208FOutput, esphome::sim800l::Sim800LComponent, esphome::esp32_touch::ESP32TouchComponent, esphome::pcd8544::PCD8544, esphome::st7735::ST7735, esphome::ethernet::EthernetComponent, esphome::hmc5883l::HMC5883LComponent, esphome::selec_meter::SelecMeter, esphome::esp32_ble_beacon::ESP32BLEBeacon, esphome::max7219digit::MAX7219Component, esphome::ads1115::ADS1115Component, esphome::esp32_ble_server::BLEServer, esphome::ili9341::ILI9341Display, esphome::mqtt::MQTTSensorComponent, esphome::tx20::Tx20Component, esphome::ade7953::ADE7953, esphome::bh1750::BH1750Sensor, esphome::climate_ir::ClimateIR, esphome::http_request::HttpRequestComponent, esphome::max31865::MAX31865Sensor, esphome::servo::Servo, esphome::template_::TemplateCover, esphome::mcp3008::MCP3008Sensor, esphome::pulse_width::PulseWidthSensor, esphome::esp32_ble::ESP32BLE, esphome::lcd_gpio::GPIOLCDDisplay, esphome::pmsa003i::PMSA003IComponent, esphome::sx1509::SX1509Component, esphome::improv_serial::ImprovSerialComponent, esphome::modbus_controller::ModbusBinarySensor, esphome::mqtt::MQTTFanComponent, esphome::qmc5883l::QMC5883LComponent, esphome::sgp30::SGP30Component, esphome::ble_scanner::BLEScanner, esphome::sun::SunTextSensor, esphome::adc::ADCSensor, esphome::cse7761::CSE7761Component, esphome::gpio::GPIOSwitch, esphome::modbus_controller::ModbusSwitch, esphome::mqtt::MQTTCoverComponent, esphome::vl53l0x::VL53L0XSensor, esphome::integration::IntegrationSensor, esphome::mdns::MDNSComponent, esphome::modbus_controller::ModbusTextSensor, esphome::t6615::T6615Component, esphome::teleinfo::TeleInfo, esphome::anova::Anova, esphome::pid::PIDClimateSensor, esphome::power_supply::PowerSupply, esphome::sps30::SPS30Component, esphome::status_led::StatusLEDLightOutput, esphome::esp32_camera_web_server::CameraWebServer, esphome::hm3301::HM3301Component, esphome::ledc::LEDCOutput, esphome::max7219::MAX7219Component, esphome::modbus_controller::ModbusNumber, esphome::modbus_controller::ModbusOutput, esphome::pcf8574::PCF8574Component, esphome::tlc5947::TLC5947, esphome::api::APIServer, esphome::ccs811::CCS811Component, esphome::duty_cycle::DutyCycleSensor, esphome::hbridge::HBridgeFan, esphome::modbus_controller::ModbusSensor, esphome::mqtt::MQTTNumberComponent, esphome::mqtt::MQTTSelectComponent, esphome::resistance::ResistanceSensor, esphome::scd30::SCD30Component, esphome::st7920::ST7920, esphome::tca9548a::TCA9548AComponent, esphome::atc_mithermometer::ATCMiThermometer, esphome::binary_sensor_map::BinarySensorMap, esphome::esp8266_pwm::ESP8266PWM, esphome::midea::ac::AirConditioner, esphome::pn532::PN532, esphome::pvvx_mithermometer::PVVXMiThermometer, esphome::rc522_spi::RC522Spi, esphome::total_daily_energy::TotalDailyEnergy, esphome::ttp229_bsf::TTP229BSFComponent, esphome::uln2003::ULN2003, esphome::airthings_wave_mini::AirthingsWaveMini, esphome::airthings_wave_plus::AirthingsWavePlus, esphome::am43::Am43, esphome::am43::Am43Component, esphome::bang_bang::BangBangClimate, esphome::ble_client::BLESensor, esphome::my9231::MY9231OutputComponent, esphome::tm1637::TM1637Display, esphome::esp32_improv::ESP32ImprovComponent, esphome::hx711::HX711Sensor, esphome::mqtt::MQTTBinarySensorComponent, esphome::pulse_meter::PulseMeterSensor, esphome::pzem004t::PZEM004T, esphome::pzemac::PZEMAC, esphome::sm300d2::SM300D2Sensor, esphome::ttp229_lsf::TTP229LSFComponent, esphome::xiaomi_cgpr1::XiaomiCGPR1, esphome::xiaomi_miscale::XiaomiMiscale, esphome::xiaomi_mjyd02yla::XiaomiMJYD02YLA, esphome::hlw8012::HLW8012Component, esphome::mqtt::MQTTJSONLightComponent, esphome::mqtt::MQTTTextSensor, esphome::pzemdc::PZEMDC, esphome::sm16716::SM16716, esphome::tm1651::TM1651Display, esphome::ultrasonic::UltrasonicSensorComponent, esphome::xiaomi_wx08zm::XiaomiWX08ZM, esphome::i2c::ArduinoI2CBus, esphome::i2c::IDFI2CBus, esphome::mqtt::MQTTSwitchComponent, esphome::pmsx003::PMSX003Component, esphome::wifi_info::IPAddressWiFiInfo, esphome::xiaomi_mue4094rt::XiaomiMUE4094RT, esphome::captive_portal::CaptivePortal, esphome::mcp3008::MCP3008, esphome::sds011::SDS011Component, esphome::sht4x::SHT4XComponent, esphome::sm2135::SM2135, esphome::xiaomi_cgg1::XiaomiCGG1, esphome::as3935_spi::SPIAS3935Component, esphome::bmp085::BMP085Component, esphome::cse7766::CSE7766Component, esphome::esp32_dac::ESP32DAC, esphome::gpio::GPIOBinaryOutput, esphome::mhz19::MHZ19Component, esphome::modbus::Modbus, esphome::mqtt_subscribe::MQTTSubscribeSensor, esphome::mqtt_subscribe::MQTTSubscribeTextSensor, esphome::pid::PIDClimate, esphome::shtcx::SHTCXComponent, esphome::sun::SunSensor, esphome::xiaomi_cgd1::XiaomiCGD1, esphome::xiaomi_cgdk2::XiaomiCGDK2, esphome::xiaomi_gcls002::XiaomiGCLS002, esphome::xiaomi_hhccjcy01::XiaomiHHCCJCY01, esphome::xiaomi_hhccpot002::XiaomiHHCCPOT002, esphome::xiaomi_jqjcy01ym::XiaomiJQJCY01YM, esphome::xiaomi_lywsd02::XiaomiLYWSD02, esphome::xiaomi_lywsd03mmc::XiaomiLYWSD03MMC, esphome::xiaomi_lywsdcgq::XiaomiLYWSDCGQ, esphome::xiaomi_mhoc401::XiaomiMHOC401, esphome::b_parasite::BParasite, esphome::ble_client::BLEClientSwitch, esphome::dallas::DallasComponent, esphome::inkbird_ibsth1_mini::InkbirdIbstH1Mini, esphome::max31855::MAX31855Sensor, esphome::mcp23s08::MCP23S08, esphome::mcp23s17::MCP23S17, esphome::rtttl::Rtttl, esphome::sntp::SNTPComponent, esphome::ssd1306_spi::SPISSD1306, esphome::ssd1322_spi::SPISSD1322, esphome::ssd1325_spi::SPISSD1325, esphome::ssd1327_spi::SPISSD1327, esphome::ssd1331_spi::SPISSD1331, esphome::ssd1351_spi::SPISSD1351, esphome::template_::TemplateTextSensor, esphome::uart::ESP32ArduinoUARTComponent, esphome::custom::CustomBinarySensorConstructor, esphome::custom::CustomTextSensorConstructor, esphome::gpio::GPIOBinarySensor, esphome::hdc1080::HDC1080Component, esphome::htu21d::HTU21DComponent, esphome::rc522::RC522, esphome::senseair::SenseAirComponent, esphome::sht3xd::SHT3XDComponent, esphome::slow_pwm::SlowPWMOutput, esphome::speed::SpeedFan, esphome::template_::TemplateNumber, esphome::template_::TemplateSelect, esphome::uart::UARTSwitch, esphome::a4988::A4988, esphome::binary::BinaryFan, esphome::current_based::CurrentBasedCover, esphome::hrxl_maxsonar_wr::HrxlMaxsonarWrComponent, esphome::max6675::MAX6675Sensor, esphome::mcp23008::MCP23008, esphome::mcp23017::MCP23017, esphome::ntc::NTC, esphome::output::OutputSwitch, esphome::pm1006::PM1006Component, esphome::pn532_spi::PN532Spi, esphome::scd4x::SCD4XComponent, esphome::sdp3x::SDP3XComponent, esphome::sx1509::SX1509FloatOutputChannel, esphome::atm90e32::ATM90E32Component, esphome::ct_clamp::CTClampSensor, esphome::custom::CustomSensorConstructor, esphome::custom::CustomSwitchConstructor, esphome::endstop::EndstopCover, esphome::mcp4725::MCP4725, esphome::pipsolar::PipsolarSwitch, esphome::sn74hc595::SN74HC595Component, esphome::template_::TemplateSensor, esphome::template_::TemplateSwitch, esphome::tuya::TuyaFan, esphome::uart::IDFUARTComponent, esphome::aht10::AHT10Component, esphome::apds9960::APDS9960, esphome::as3935_i2c::I2CAS3935Component, esphome::ds1307::DS1307Component, esphome::ezo::EZOSensor, esphome::homeassistant::HomeassistantBinarySensor, esphome::homeassistant::HomeassistantSensor, esphome::homeassistant::HomeassistantTextSensor, esphome::homeassistant::HomeassistantTime, esphome::lcd_pcf8574::PCF8574LCDDisplay, esphome::status::StatusBinarySensor, esphome::status_led::StatusLED, esphome::sts3x::STS3XComponent, esphome::template_::TemplateBinarySensor, esphome::time_based::TimeBasedCover, esphome::tmp102::TMP102Component, esphome::tof10120::TOF10120Sensor, esphome::tuya::TuyaClimate, esphome::wifi_signal::WiFiSignalSensor, esphome::am2320::AM2320Component, esphome::dht12::DHT12Component, esphome::esp32_hall::ESP32HallSensor, esphome::ina219::INA219Component, esphome::ina226::INA226Component, esphome::ina3221::INA3221Component, esphome::mcp9808::MCP9808Sensor, esphome::mpu6050::MPU6050Component, esphome::ms5611::MS5611Component, esphome::pipsolar::PipsolarTextSensor, esphome::ssd1306_i2c::I2CSSD1306, esphome::ssd1327_i2c::I2CSSD1327, esphome::tmp117::TMP117Component, esphome::tuya::TuyaBinarySensor, esphome::tuya::TuyaCover, esphome::tuya::TuyaLight, esphome::tuya::TuyaSensor, esphome::tuya::TuyaSwitch, esphome::version::VersionTextSensor, esphome::debug::DebugComponent, esphome::pn532_i2c::PN532I2C, esphome::rc522_i2c::RC522I2C, esphome::safe_mode::SafeModeSwitch, esphome::teleinfo::TeleInfoSensor, esphome::uptime::UptimeSensor, esphome::restart::RestartSwitch, esphome::shutdown::ShutdownSwitch, and esphome::teleinfo::TeleInfoTextSensor.

Definition at line 145 of file component.cpp.

◆ get_actual_setup_priority()

float esphome::Component::get_actual_setup_priority ( ) const

Definition at line 146 of file component.cpp.

◆ get_component_source()

const char * esphome::Component::get_component_source ( ) const

Get the integration where this component was declared as a string.

Returns "<unknown>" if source not set

Definition at line 97 of file component.cpp.

◆ get_component_state()

uint32_t esphome::Component::get_component_state ( ) const

Definition at line 70 of file component.cpp.

◆ get_loop_priority()

float esphome::Component::get_loop_priority ( ) const
virtual

priority of loop().

higher -> executed earlier

Defaults to 0.

Returns
The loop priority of this component

Reimplemented in esphome::wifi::WiFiComponent, esphome::deep_sleep::DeepSleepComponent, esphome::status_led::StatusLEDLightOutput, and esphome::status_led::StatusLED.

Definition at line 42 of file component.cpp.

◆ get_setup_priority()

float esphome::Component::get_setup_priority ( ) const
virtual

priority of setup().

higher -> executed earlier

Defaults to 0.

Returns
The setup priority of this component

Reimplemented in esphome::nextion::Nextion, esphome::WaitUntilAction< Ts >, esphome::mqtt::MQTTMessageTrigger, esphome::sensor::HeartbeatFilter, esphome::sensor::DebounceFilter, esphome::tsl2591::TSL2591Component, esphome::fastled_base::FastLEDLightOutput, esphome::spi::SPIComponent, esphome::wifi::WiFiComponent, esphome::mqtt::MQTTClientComponent, esphome::sensor::ThrottleAverageFilter, esphome::esp32_ble_tracker::ESP32BLETracker, esphome::graph::Graph, esphome::script::ScriptWaitAction< Ts >, esphome::st7789v::ST7789V, esphome::DelayAction< Ts >, esphome::binary_sensor::MultiClickTrigger, esphome::bme680::BME680Component, esphome::LoopTrigger, esphome::fan::FanState, esphome::web_server_base::WebServerBase, esphome::mqtt::MQTTComponent, esphome::neopixelbus::NeoPixelBusLightOutputBase< T_METHOD, T_COLOR_FEATURE >, esphome::ble_presence::BLEPresenceDevice, esphome::StartupTrigger, esphome::binary_sensor::AutorepeatFilter, esphome::ble_client::BLEClient, esphome::rotary_encoder::RotaryEncoderSensor, esphome::wifi_info::BSSIDWiFiInfo, esphome::midea::ApplianceBase< T >, esphome::midea::ApplianceBase< dudanov::midea::ac::AirConditioner >, esphome::bme280::BME280Component, esphome::esp32_camera::ESP32Camera, esphome::cs5460a::CS5460AComponent, esphome::max31856::MAX31856Sensor, esphome::web_server::WebServer, esphome::mpr121::MPR121Component, esphome::tuya::Tuya, esphome::zyaura::ZyAuraSensor, esphome::deep_sleep::DeepSleepComponent, esphome::tsl2561::TSL2561Sensor, esphome::bmp280::BMP280Component, esphome::inkplate6::Inkplate6, esphome::logger::Logger, esphome::wifi_info::SSIDWiFiInfo, esphome::ForCondition< Ts >, esphome::ota::OTAComponent, esphome::canbus::Canbus, esphome::pulse_counter::PulseCounterSensor, esphome::xpt2046::XPT2046Component, esphome::bme680_bsec::BME680BSECComponent, esphome::as3935::AS3935Component, esphome::binary_sensor::DelayedOffFilter, esphome::ble_rssi::BLERSSISensor, esphome::daly_bms::DalyBmsComponent, esphome::ltr390::LTR390Component, esphome::tcs34725::TCS34725Component, esphome::uart::ESP8266UartComponent, esphome::light::LightState, esphome::ruuvitag::RuuviTag, esphome::sensor::ValueRangeTrigger, esphome::sgp40::SGP40Component, esphome::dht::DHT, esphome::st7735::ST7735, esphome::wifi_info::ScanResultsWiFiInfo, esphome::cap1188::CAP1188Component, esphome::pca9685::PCA9685Output, esphome::ssd1306_base::SSD1306, esphome::binary_sensor::DelayedOnFilter, esphome::tlc59208f::TLC59208FOutput, esphome::esp32_touch::ESP32TouchComponent, esphome::globals::RestoringGlobalsComponent< T >, esphome::max7219digit::MAX7219Component, esphome::hbridge::HBridgeLightOutput, esphome::ethernet::EthernetComponent, esphome::hmc5883l::HMC5883LComponent, esphome::esp32_ble_beacon::ESP32BLEBeacon, esphome::ads1115::ADS1115Component, esphome::number::ValueRangeTrigger, esphome::esp32_ble_server::BLEServer, esphome::gps::GPS, esphome::bh1750::BH1750Sensor, esphome::tx20::Tx20Component, esphome::http_request::HttpRequestComponent, esphome::max31865::MAX31865Sensor, esphome::mcp23016::MCP23016, esphome::pcd8544::PCD8544, esphome::servo::Servo, esphome::template_::TemplateCover, esphome::binary_sensor_map::BinarySensorMap, esphome::mcp3008::MCP3008Sensor, esphome::pmsa003i::PMSA003IComponent, esphome::pulse_width::PulseWidthSensor, esphome::ssd1325_base::SSD1325, esphome::binary_sensor::DelayedOnOffFilter, esphome::e131::E131Component, esphome::esp32_ble::ESP32BLE, esphome::improv_serial::ImprovSerialComponent, esphome::mdns::MDNSComponent, esphome::sx1509::SX1509Component, esphome::qmc5883l::QMC5883LComponent, esphome::sgp30::SGP30Component, esphome::adc::ADCSensor, esphome::ble_scanner::BLEScanner, esphome::cse7761::CSE7761Component, esphome::max7219::MAX7219Component, esphome::prometheus::PrometheusHandler, esphome::ssd1351_base::SSD1351, esphome::vl53l0x::VL53L0XSensor, esphome::integration::IntegrationSensor, esphome::power_supply::PowerSupply, esphome::ssd1322_base::SSD1322, esphome::ssd1327_base::SSD1327, esphome::status_led::StatusLEDLightOutput, esphome::anova::Anova, esphome::esp32_improv::ESP32ImprovComponent, esphome::ledc::LEDCOutput, esphome::modbus_controller::ModbusNumber, esphome::sps30::SPS30Component, esphome::tlc5947::TLC5947, esphome::tm1637::TM1637Display, esphome::ccs811::CCS811Component, esphome::esp32_camera_web_server::CameraWebServer, esphome::hm3301::HM3301Component, esphome::pn532::PN532, esphome::esp8266_pwm::ESP8266PWM, esphome::gpio::GPIOSwitch, esphome::hbridge::HBridgeFan, esphome::resistance::ResistanceSensor, esphome::scd30::SCD30Component, esphome::st7920::ST7920, esphome::time::CronTrigger, esphome::atc_mithermometer::ATCMiThermometer, esphome::my9231::MY9231OutputComponent, esphome::pvvx_mithermometer::PVVXMiThermometer, esphome::total_daily_energy::TotalDailyEnergy, esphome::ttp229_bsf::TTP229BSFComponent, esphome::uln2003::ULN2003, esphome::ultrasonic::UltrasonicSensorComponent, esphome::am43::Am43, esphome::am43::Am43Component, esphome::ble_client::BLESensor, esphome::captive_portal::CaptivePortal, esphome::duty_cycle::DutyCycleSensor, esphome::pcf8574::PCF8574Component, esphome::sntp::SNTPComponent, esphome::ssd1331_base::SSD1331, esphome::t6615::T6615Component, esphome::template_::TemplateSwitch, esphome::api::APIServer, esphome::hx711::HX711Sensor, esphome::i2c::ArduinoI2CBus, esphome::i2c::IDFI2CBus, esphome::sm16716::SM16716, esphome::ttp229_lsf::TTP229LSFComponent, esphome::xiaomi_cgpr1::XiaomiCGPR1, esphome::xiaomi_miscale::XiaomiMiscale, esphome::xiaomi_mjyd02yla::XiaomiMJYD02YLA, esphome::hlw8012::HLW8012Component, esphome::ili9341::ILI9341Display, esphome::lcd_base::LCDDisplay, esphome::modbus::Modbus, esphome::sds011::SDS011Component, esphome::xiaomi_wx08zm::XiaomiWX08ZM, esphome::ble_client::BLEClientSwitch, esphome::pulse_meter::PulseMeterSensor, esphome::sm2135::SM2135, esphome::xiaomi_mue4094rt::XiaomiMUE4094RT, esphome::bmp085::BMP085Component, esphome::esp32_dac::ESP32DAC, esphome::hdc1080::HDC1080Component, esphome::htu21d::HTU21DComponent, esphome::mcp3008::MCP3008, esphome::rdm6300::RDM6300Component, esphome::xiaomi_cgg1::XiaomiCGG1, esphome::gpio::GPIOBinaryOutput, esphome::mqtt_subscribe::MQTTSubscribeSensor, esphome::mqtt_subscribe::MQTTSubscribeTextSensor, esphome::pm1006::PM1006Component, esphome::pmsx003::PMSX003Component, esphome::rc522::RC522, esphome::shtcx::SHTCXComponent, esphome::xiaomi_cgd1::XiaomiCGD1, esphome::xiaomi_cgdk2::XiaomiCGDK2, esphome::xiaomi_gcls002::XiaomiGCLS002, esphome::xiaomi_hhccjcy01::XiaomiHHCCJCY01, esphome::xiaomi_hhccpot002::XiaomiHHCCPOT002, esphome::xiaomi_jqjcy01ym::XiaomiJQJCY01YM, esphome::xiaomi_lywsd02::XiaomiLYWSD02, esphome::xiaomi_lywsd03mmc::XiaomiLYWSD03MMC, esphome::xiaomi_lywsdcgq::XiaomiLYWSDCGQ, esphome::xiaomi_mhoc401::XiaomiMHOC401, esphome::b_parasite::BParasite, esphome::dallas::DallasComponent, esphome::gpio::GPIOBinarySensor, esphome::inkbird_ibsth1_mini::InkbirdIbstH1Mini, esphome::max31855::MAX31855Sensor, esphome::mcp23xxx_base::MCP23XXXBase, esphome::slow_pwm::SlowPWMOutput, esphome::uart::ESP32ArduinoUARTComponent, esphome::wifi_info::IPAddressWiFiInfo, esphome::a4988::A4988, esphome::sdp3x::SDP3XComponent, esphome::sht3xd::SHT3XDComponent, esphome::sht4x::SHT4XComponent, esphome::speed::SpeedFan, esphome::template_::TemplateNumber, esphome::template_::TemplateSelect, esphome::tmp102::TMP102Component, esphome::binary::BinaryFan, esphome::cse7766::CSE7766Component, esphome::current_based::CurrentBasedCover, esphome::max6675::MAX6675Sensor, esphome::mpu6050::MPU6050Component, esphome::ntc::NTC, esphome::sx1509::SX1509FloatOutputChannel, esphome::template_::TemplateSensor, esphome::wifi_signal::WiFiSignalSensor, esphome::atm90e32::ATM90E32Component, esphome::ct_clamp::CTClampSensor, esphome::endstop::EndstopCover, esphome::ezo::EZOSensor, esphome::homeassistant::HomeassistantTime, esphome::preferences::IntervalSyncer, esphome::status::StatusBinarySensor, esphome::status_led::StatusLED, esphome::template_::TemplateBinarySensor, esphome::template_::TemplateTextSensor, esphome::uart::IDFUARTComponent, esphome::waveshare_epaper::WaveshareEPaper, esphome::aht10::AHT10Component, esphome::apds9960::APDS9960, esphome::ds1307::DS1307Component, esphome::homeassistant::HomeassistantBinarySensor, esphome::homeassistant::HomeassistantSensor, esphome::homeassistant::HomeassistantTextSensor, esphome::ina3221::INA3221Component, esphome::mhz19::MHZ19Component, esphome::output::OutputSwitch, esphome::sts3x::STS3XComponent, esphome::time_based::TimeBasedCover, esphome::tof10120::TOF10120Sensor, esphome::am2320::AM2320Component, esphome::dht12::DHT12Component, esphome::ina219::INA219Component, esphome::ina226::INA226Component, esphome::mcp9808::MCP9808Sensor, esphome::ms5611::MS5611Component, esphome::scd4x::SCD4XComponent, esphome::sn74hc595::SN74HC595Component, esphome::tmp117::TMP117Component, esphome::tuya::TuyaFan, esphome::uptime::UptimeSensor, esphome::version::VersionTextSensor, esphome::senseair::SenseAirComponent, esphome::interval::IntervalTrigger, esphome::sm300d2::SM300D2Sensor, and esphome::debug::DebugComponent.

Definition at line 44 of file component.cpp.

◆ has_overridden_loop()

bool esphome::Component::has_overridden_loop ( ) const

Definition at line 153 of file component.cpp.

◆ is_failed()

bool esphome::Component::is_failed ( )

Definition at line 123 of file component.cpp.

◆ loop()

void esphome::Component::loop ( )
virtual

This method will be called repeatedly.

Analogous to Arduino's loop(). setup() is guaranteed to be called before this. Defaults to doing nothing.

Reimplemented in esphome::nextion::Nextion, esphome::modbus_controller::ModbusController, esphome::WaitUntilAction< Ts >, esphome::wifi::WiFiComponent, esphome::mqtt::MQTTClientComponent, esphome::esp32_ble_tracker::ESP32BLETracker, esphome::st7789v::ST7789V, esphome::script::ScriptWaitAction< Ts >, esphome::LoopTrigger, esphome::ble_client::BLEClient, esphome::rotary_encoder::RotaryEncoderSensor, esphome::midea::ApplianceBase< T >, esphome::midea::ApplianceBase< dudanov::midea::ac::AirConditioner >, esphome::cs5460a::CS5460AComponent, esphome::esp32_camera::ESP32Camera, esphome::uart::UARTDummyReceiver, esphome::mpr121::MPR121Component, esphome::tuya::Tuya, esphome::wifi_info::BSSIDWiFiInfo, esphome::xpt2046::XPT2046Component, esphome::deep_sleep::DeepSleepComponent, esphome::ota::OTAComponent, esphome::ForCondition< Ts >, esphome::canbus::Canbus, esphome::bme680_bsec::BME680BSECComponent, esphome::as3935::AS3935Component, esphome::wifi_info::SSIDWiFiInfo, esphome::script::QueueingScript, esphome::dsmr::Dsmr, esphome::light::LightState, esphome::cap1188::CAP1188Component, esphome::pca9685::PCA9685Output, esphome::rf_bridge::RFBridgeComponent, esphome::globals::RestoringGlobalsComponent< T >, esphome::tlc59208f::TLC59208FOutput, esphome::esp32_touch::ESP32TouchComponent, esphome::sim800l::Sim800LComponent, esphome::gps::GPS, esphome::ethernet::EthernetComponent, esphome::tx20::Tx20Component, esphome::max7219digit::MAX7219Component, esphome::esp32_ble_server::BLEServer, esphome::sx1509::SX1509Component, esphome::binary_sensor_map::BinarySensorMap, esphome::template_::TemplateCover, esphome::vl53l0x::VL53L0XSensor, esphome::e131::E131Component, esphome::esp32_ble::ESP32BLE, esphome::mdns::MDNSComponent, esphome::tlc5947::TLC5947, esphome::esp32_camera_web_server::CameraWebServer, esphome::improv_serial::ImprovSerialComponent, esphome::pn532::PN532, esphome::total_daily_energy::TotalDailyEnergy, esphome::dfplayer::DFPlayer, esphome::my9231::MY9231OutputComponent, esphome::sntp::SNTPComponent, esphome::sm16716::SM16716, esphome::t6615::T6615Component, esphome::ttp229_bsf::TTP229BSFComponent, esphome::teleinfo::TeleInfo, esphome::time::CronTrigger, esphome::api::APIServer, esphome::hbridge::HBridgeFan, esphome::sm2135::SM2135, esphome::ttp229_lsf::TTP229LSFComponent, esphome::anova::Anova, esphome::esp32_improv::ESP32ImprovComponent, esphome::uart::UARTDebugger, esphome::uln2003::ULN2003, esphome::slow_pwm::SlowPWMOutput, esphome::template_::TemplateSwitch, esphome::rc522::RC522, esphome::am43::Am43Component, esphome::captive_portal::CaptivePortal, esphome::gpio::GPIOBinarySensor, esphome::pulse_meter::PulseMeterSensor, esphome::rtttl::Rtttl, esphome::sds011::SDS011Component, esphome::ble_client::BLESensor, esphome::status_led::StatusLEDLightOutput, esphome::ble_client::BLEClientSwitch, esphome::pmsx003::PMSX003Component, esphome::pzem004t::PZEM004T, esphome::a4988::A4988, esphome::apds9960::APDS9960, esphome::modbus::Modbus, esphome::pm1006::PM1006Component, esphome::servo::Servo, esphome::cse7766::CSE7766Component, esphome::rdm6300::RDM6300Component, esphome::speed::SpeedFan, esphome::binary::BinaryFan, esphome::current_based::CurrentBasedCover, esphome::hrxl_maxsonar_wr::HrxlMaxsonarWrComponent, esphome::status_led::StatusLED, esphome::ct_clamp::CTClampSensor, esphome::endstop::EndstopCover, esphome::ezo::EZOSensor, esphome::template_::TemplateBinarySensor, esphome::time_based::TimeBasedCover, esphome::tuya::TuyaClimate, esphome::uart::UARTSwitch, esphome::wifi_info::IPAddressWiFiInfo, esphome::status::StatusBinarySensor, and esphome::debug::DebugComponent.

Definition at line 48 of file component.cpp.

◆ mark_failed()

void esphome::Component::mark_failed ( )
virtual

Mark this component as failed.

Any future timeouts/intervals/setup/loop will no longer be called.

This might be useful if a component wants to indicate that a connection to its peripheral failed. For example, i2c based components can check if the remote device is responding and otherwise mark the component as failed. Eventually this will also enable smart status LEDs.

Reimplemented in esphome::esp32_ble::ESP32BLE.

Definition at line 102 of file component.cpp.

◆ on_safe_shutdown()

virtual void esphome::Component::on_safe_shutdown ( )
inlinevirtual

Reimplemented in esphome::ota::OTAComponent, and esphome::waveshare_epaper::WaveshareEPaper.

Definition at line 105 of file component.h.

◆ on_shutdown()

virtual void esphome::Component::on_shutdown ( )
inlinevirtual

◆ set_component_source()

void esphome::Component::set_component_source ( const char *  source)
inline

Set where this component was loaded from for some debug messages.

This is set by the ESPHome core, and should not be called manually.

Definition at line 143 of file component.h.

◆ set_interval() [1/2]

void esphome::Component::set_interval ( const std::string &  name,
uint32_t  interval,
std::function< void()> &&  f 
)
protected

Set an interval function with a unique name.

Empty name means no cancelling possible.

This will call f every interval ms. Can be cancelled via CancelInterval(). Similar to javascript's setInterval().

IMPORTANT: Do not rely on this having correct timing. This is only called from loop() and therefore can be significantly delay. If you need exact timing please use hardware timers.

Parameters
nameThe identifier for this interval function.
intervalThe interval in ms.
fThe function (or lambda) that should be called
See also
cancel_interval()

Definition at line 50 of file component.cpp.

◆ set_interval() [2/2]

void esphome::Component::set_interval ( uint32_t  interval,
std::function< void()> &&  f 
)
protected

Definition at line 120 of file component.cpp.

◆ set_setup_priority()

void esphome::Component::set_setup_priority ( float  priority)

Definition at line 151 of file component.cpp.

◆ set_timeout() [1/2]

void esphome::Component::set_timeout ( uint32_t  timeout,
std::function< void()> &&  f 
)
protected

Definition at line 117 of file component.cpp.

◆ set_timeout() [2/2]

void esphome::Component::set_timeout ( const std::string &  name,
uint32_t  timeout,
std::function< void()> &&  f 
)
protected

Set a timeout function with a unique name.

Similar to javascript's setTimeout(). Empty name means no cancelling possible.

IMPORTANT: Do not rely on this having correct timing. This is only called from loop() and therefore can be significantly delay. If you need exact timing please use hardware timers.

Parameters
nameThe identifier for this timeout function.
timeoutThe timeout in ms.
fThe function (or lambda) that should be called
See also
cancel_timeout()

Definition at line 58 of file component.cpp.

◆ setup()

void esphome::Component::setup ( )
virtual

Where the component's initialization should happen.

Analogous to Arduino's setup(). This method is guaranteed to only be called once. Defaults to doing nothing.

Reimplemented in esphome::nextion::Nextion, esphome::modbus_controller::ModbusController, esphome::mqtt::MQTTMessageTrigger, esphome::sensor::HeartbeatFilter, esphome::tsl2591::TSL2591Component, esphome::fastled_base::FastLEDLightOutput, esphome::wifi::WiFiComponent, esphome::mqtt::MQTTClientComponent, esphome::sensor::ThrottleAverageFilter, esphome::esp32_ble_tracker::ESP32BLETracker, esphome::graph::Graph, esphome::canbus::CanbusTrigger, esphome::st7789v::ST7789V, esphome::bme680::BME680Component, esphome::fan::FanState, esphome::binary_sensor::MultiClickTrigger, esphome::wifi_info::MacAddressWifiInfo, esphome::heatpumpir::HeatpumpIRClimate, esphome::StartupTrigger, esphome::fingerprint_grow::FingerprintGrowComponent, esphome::ble_client::BLEClient, esphome::midea::ApplianceBase< T >, esphome::rotary_encoder::RotaryEncoderSensor, esphome::midea::ApplianceBase< dudanov::midea::ac::AirConditioner >, esphome::neopixelbus::NeoPixelBusLightOutputBase< T_METHOD, T_COLOR_FEATURE >, esphome::bme280::BME280Component, esphome::spi::SPIComponent, esphome::inkplate6::Inkplate6, esphome::cs5460a::CS5460AComponent, esphome::esp32_camera::ESP32Camera, esphome::max31856::MAX31856Sensor, esphome::tuya::Tuya, esphome::mpr121::MPR121Component, esphome::web_server::WebServer, esphome::zyaura::ZyAuraSensor, esphome::tsl2561::TSL2561Sensor, esphome::bmp280::BMP280Component, esphome::deep_sleep::DeepSleepComponent, esphome::pid::PIDSimulator, esphome::ota::OTAComponent, esphome::canbus::Canbus, esphome::pulse_counter::PulseCounterSensor, esphome::xpt2046::XPT2046Component, esphome::bme680_bsec::BME680BSECComponent, esphome::as3935::AS3935Component, esphome::ltr390::LTR390Component, esphome::tcs34725::TCS34725Component, esphome::uart::ESP8266UartComponent, esphome::daly_bms::DalyBmsComponent, esphome::pcd8544::PCD8544, esphome::ac_dimmer::AcDimmer, esphome::thermostat::ThermostatClimate, esphome::light::LightState, esphome::sgp40::SGP40Component, esphome::cap1188::CAP1188Component, esphome::dht::DHT, esphome::pca9685::PCA9685Output, esphome::tlc59208f::TLC59208FOutput, esphome::st7735::ST7735, esphome::esp32_touch::ESP32TouchComponent, esphome::sensor::ValueRangeTrigger, esphome::addressable_light::AddressableLightDisplay, esphome::hmc5883l::HMC5883LComponent, esphome::esp32_ble_beacon::ESP32BLEBeacon, esphome::ethernet::EthernetComponent, esphome::globals::RestoringGlobalsComponent< T >, esphome::ili9341::ILI9341Display, esphome::number::ValueRangeTrigger, esphome::ads1115::ADS1115Component, esphome::esp32_ble_server::BLEServer, esphome::max7219digit::MAX7219Component, esphome::tx20::Tx20Component, esphome::bh1750::BH1750Sensor, esphome::climate_ir::ClimateIR, esphome::max31865::MAX31865Sensor, esphome::mqtt::MQTTSensorComponent, esphome::pulse_width::PulseWidthSensor, esphome::template_::TemplateCover, esphome::e131::E131Component, esphome::mcp3008::MCP3008Sensor, esphome::pmsa003i::PMSA003IComponent, esphome::sx1509::SX1509Component, esphome::esp32_ble::ESP32BLE, esphome::mcp23016::MCP23016, esphome::qmc5883l::QMC5883LComponent, esphome::waveshare_epaper::WaveshareEPaper, esphome::improv_serial::ImprovSerialComponent, esphome::mqtt::MQTTFanComponent, esphome::sgp30::SGP30Component, esphome::adc::ADCSensor, esphome::cse7761::CSE7761Component, esphome::gpio::GPIOSwitch, esphome::integration::IntegrationSensor, esphome::mdns::MDNSComponent, esphome::modbus_controller::ModbusSwitch, esphome::vl53l0x::VL53L0XSensor, esphome::whirlpool::WhirlpoolClimate, esphome::hbridge::HBridgeLightOutput, esphome::power_supply::PowerSupply, esphome::prometheus::PrometheusHandler, esphome::teleinfo::TeleInfo, esphome::toshiba::ToshibaClimate, esphome::hm3301::HM3301Component, esphome::ledc::LEDCOutput, esphome::modbus_controller::ModbusOutput, esphome::sps30::SPS30Component, esphome::ssd1306_base::SSD1306, esphome::status_led::StatusLEDLightOutput, esphome::esp32_camera_web_server::CameraWebServer, esphome::esp32_improv::ESP32ImprovComponent, esphome::max7219::MAX7219Component, esphome::mqtt::MQTTNumberComponent, esphome::mqtt::MQTTSelectComponent, esphome::st7920::ST7920, esphome::tca9548a::TCA9548AComponent, esphome::tlc5947::TLC5947, esphome::ade7953::ADE7953, esphome::duty_cycle::DutyCycleSensor, esphome::esp8266_pwm::ESP8266PWM, esphome::hbridge::HBridgeFan, esphome::pid::PIDClimateSensor, esphome::scd30::SCD30Component, esphome::servo::Servo, esphome::total_daily_energy::TotalDailyEnergy, esphome::ttp229_bsf::TTP229BSFComponent, esphome::anova::Anova, esphome::bang_bang::BangBangClimate, esphome::my9231::MY9231OutputComponent, esphome::pn532::PN532, esphome::rc522_spi::RC522Spi, esphome::uln2003::ULN2003, esphome::api::APIServer, esphome::ccs811::CCS811Component, esphome::hx711::HX711Sensor, esphome::lcd_base::LCDDisplay, esphome::tm1637::TM1637Display, esphome::ttp229_lsf::TTP229LSFComponent, esphome::globals::GlobalsComponent< T >, esphome::hlw8012::HLW8012Component, esphome::mqtt::MQTTBinarySensorComponent, esphome::resistance::ResistanceSensor, esphome::tm1651::TM1651Display, esphome::ultrasonic::UltrasonicSensorComponent, esphome::am43::Am43, esphome::am43::Am43Component, esphome::demo::DemoFan, esphome::i2c::ArduinoI2CBus, esphome::i2c::IDFI2CBus, esphome::mqtt::MQTTClimateComponent, esphome::mqtt::MQTTJSONLightComponent, esphome::mqtt::MQTTSwitchComponent, esphome::mqtt::MQTTTextSensor, esphome::pulse_meter::PulseMeterSensor, esphome::sm16716::SM16716, esphome::ssd1325_base::SSD1325, esphome::captive_portal::CaptivePortal, esphome::demo::DemoCover, esphome::mcp3008::MCP3008, esphome::sds011::SDS011Component, esphome::sht4x::SHT4XComponent, esphome::as3935_spi::SPIAS3935Component, esphome::bmp085::BMP085Component, esphome::demo::DemoClimate, esphome::demo::DemoNumber, esphome::esp32_dac::ESP32DAC, esphome::mqtt::MQTTCoverComponent, esphome::mqtt_subscribe::MQTTSubscribeSensor, esphome::mqtt_subscribe::MQTTSubscribeTextSensor, esphome::pid::PIDClimate, esphome::shtcx::SHTCXComponent, esphome::sm2135::SM2135, esphome::dallas::DallasComponent, esphome::max31855::MAX31855Sensor, esphome::mcp23s08::MCP23S08, esphome::mcp23s17::MCP23S17, esphome::mhz19::MHZ19Component, esphome::pcf8574::PCF8574Component, esphome::pzem004t::PZEM004T, esphome::sntp::SNTPComponent, esphome::ssd1351_base::SSD1351, esphome::uart::ESP32ArduinoUARTComponent, esphome::gpio::GPIOBinarySensor, esphome::hdc1080::HDC1080Component, esphome::htu21d::HTU21DComponent, esphome::sht3xd::SHT3XDComponent, esphome::slow_pwm::SlowPWMOutput, esphome::ssd1306_spi::SPISSD1306, esphome::ssd1322_base::SSD1322, esphome::ssd1322_spi::SPISSD1322, esphome::ssd1325_spi::SPISSD1325, esphome::ssd1327_base::SSD1327, esphome::ssd1327_spi::SPISSD1327, esphome::ssd1331_spi::SPISSD1331, esphome::ssd1351_spi::SPISSD1351, esphome::a4988::A4988, esphome::max6675::MAX6675Sensor, esphome::mcp23008::MCP23008, esphome::mcp23017::MCP23017, esphome::modbus::Modbus, esphome::ntc::NTC, esphome::pm1006::PM1006Component, esphome::rc522::RC522, esphome::scd4x::SCD4XComponent, esphome::sdp3x::SDP3XComponent, esphome::speed::SpeedFan, esphome::sx1509::SX1509FloatOutputChannel, esphome::template_::TemplateNumber, esphome::template_::TemplateSelect, esphome::yashima::YashimaClimate, esphome::atm90e32::ATM90E32Component, esphome::binary::BinaryFan, esphome::current_based::CurrentBasedCover, esphome::gpio::GPIOBinaryOutput, esphome::mcp4725::MCP4725, esphome::output::OutputSwitch, esphome::pn532_spi::PN532Spi, esphome::template_::TemplateSwitch, esphome::uart::IDFUARTComponent, esphome::apds9960::APDS9960, esphome::endstop::EndstopCover, esphome::homeassistant::HomeassistantBinarySensor, esphome::homeassistant::HomeassistantSensor, esphome::homeassistant::HomeassistantTextSensor, esphome::lcd_pcf8574::PCF8574LCDDisplay, esphome::sn74hc595::SN74HC595Component, esphome::status::StatusBinarySensor, esphome::sts3x::STS3XComponent, esphome::tmp102::TMP102Component, esphome::tuya::TuyaFan, esphome::aht10::AHT10Component, esphome::am2320::AM2320Component, esphome::demo::DemoSwitch, esphome::dht12::DHT12Component, esphome::ds1307::DS1307Component, esphome::homeassistant::HomeassistantTime, esphome::ina219::INA219Component, esphome::ina226::INA226Component, esphome::ina3221::INA3221Component, esphome::lcd_gpio::GPIOLCDDisplay, esphome::mcp9808::MCP9808Sensor, esphome::mpu6050::MPU6050Component, esphome::ms5611::MS5611Component, esphome::preferences::IntervalSyncer, esphome::ssd1306_i2c::I2CSSD1306, esphome::ssd1327_i2c::I2CSSD1327, esphome::ssd1331_base::SSD1331, esphome::time_based::TimeBasedCover, esphome::tmp117::TMP117Component, esphome::tof10120::TOF10120Sensor, esphome::tuya::TuyaBinarySensor, esphome::tuya::TuyaClimate, esphome::tuya::TuyaCover, esphome::tuya::TuyaLight, esphome::tuya::TuyaSensor, esphome::tuya::TuyaSwitch, esphome::version::VersionTextSensor, and esphome::demo::DemoBinarySensor.

Definition at line 46 of file component.cpp.

◆ status_clear_error()

void esphome::Component::status_clear_error ( )

Definition at line 136 of file component.cpp.

◆ status_clear_warning()

void esphome::Component::status_clear_warning ( )

Definition at line 135 of file component.cpp.

◆ status_has_error()

bool esphome::Component::status_has_error ( )

Definition at line 126 of file component.cpp.

◆ status_has_warning()

bool esphome::Component::status_has_warning ( )

Definition at line 125 of file component.cpp.

◆ status_momentary_error()

void esphome::Component::status_momentary_error ( const std::string &  name,
uint32_t  length = 5000 
)

Definition at line 141 of file component.cpp.

◆ status_momentary_warning()

void esphome::Component::status_momentary_warning ( const std::string &  name,
uint32_t  length = 5000 
)

Definition at line 137 of file component.cpp.

◆ status_set_error()

void esphome::Component::status_set_error ( )

Definition at line 131 of file component.cpp.

◆ status_set_warning()

void esphome::Component::status_set_warning ( )

Definition at line 127 of file component.cpp.

Field Documentation

◆ component_source_

const char* esphome::Component::component_source_ = nullptr
protected

Definition at line 225 of file component.h.

◆ component_state_

uint32_t esphome::Component::component_state_ {0x0000}
protected

State of this component.

Definition at line 223 of file component.h.

◆ setup_priority_override_

float esphome::Component::setup_priority_override_ {NAN}
protected

Definition at line 224 of file component.h.


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