[debug] Make sensors work without logger debug level (#8980)

This commit is contained in:
Clyde Stubbs 2025-06-01 05:27:48 +10:00 committed by Jesse Hills
parent 6554af21b9
commit aecac15809
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A

View File

@ -15,10 +15,6 @@ namespace debug {
static const char *const TAG = "debug"; static const char *const TAG = "debug";
void DebugComponent::dump_config() { void DebugComponent::dump_config() {
#ifndef ESPHOME_LOG_HAS_DEBUG
return; // Can't log below if debug logging is disabled
#endif
ESP_LOGCONFIG(TAG, "Debug component:"); ESP_LOGCONFIG(TAG, "Debug component:");
#ifdef USE_TEXT_SENSOR #ifdef USE_TEXT_SENSOR
LOG_TEXT_SENSOR(" ", "Device info", this->device_info_); LOG_TEXT_SENSOR(" ", "Device info", this->device_info_);