Fix compatibility with ESPHome 2025.11

Co-authored-by: tastopesato <52707232+tastopesato@users.noreply.github.com>
This commit is contained in:
Matthew Royle
2025-11-20 18:42:50 +02:00
committed by GitHub
parent 4ef23f01d4
commit b7b03afe8d

View File

@@ -43,7 +43,11 @@ void StreamServerComponent::loop() {
void StreamServerComponent::dump_config() {
ESP_LOGCONFIG(TAG, "Stream Server:");
#if ESPHOME_VERSION_CODE >= VERSION_CODE(2025, 11, 0)
ESP_LOGCONFIG(TAG, " Address: %s:%u", esphome::network::get_use_address(), this->port_);
#else
ESP_LOGCONFIG(TAG, " Address: %s:%u", esphome::network::get_use_address().c_str(), this->port_);
#endif
#ifdef USE_BINARY_SENSOR
LOG_BINARY_SENSOR(" ", "Connected:", this->connected_sensor_);
#endif