Merge remote-tracking branch 'upstream/dev' into integration

# Conflicts:
#	esphome/components/mdns/mdns_rp2040.cpp
This commit is contained in:
J. Nick Koston
2026-03-12 15:45:08 -10:00
2 changed files with 12 additions and 4 deletions
+8 -1
View File
@@ -214,7 +214,14 @@ LightColorValues LightCall::validate_() {
if (this->has_brightness() && this->brightness_ == 0.0f) {
this->state_ = false;
this->set_flag_(FLAG_HAS_STATE);
this->brightness_ = 1.0f;
if (color_mode & ColorCapability::BRIGHTNESS) {
// Reset brightness so the light has nonzero brightness when turned back on.
this->brightness_ = 1.0f;
} else {
// Light doesn't support brightness; clear the flag to avoid a spurious
// "brightness not supported" warning during capability validation.
this->clear_flag_(FLAG_HAS_BRIGHTNESS);
}
}
// Set color brightness to 100% if currently zero and a color is set.
+4 -3
View File
@@ -48,9 +48,10 @@ void MDNSComponent::setup() {
// safely run directly since netif status callbacks fire from IRQ context
// (PICO_CYW43_ARCH_THREADSAFE_BACKGROUND) while _restart() allocates UDP sockets.
//
// Workaround: defer MDNS.begin() and service registration until WiFi is connected
// (has an IP), then call notifyAPChange() on subsequent reconnects to restart
// mDNS probing and announcing — all from main loop context so it's thread-safe.
// Workaround: defer MDNS.begin() and service registration until the network is
// connected (has an IP), then call notifyAPChange() on subsequent reconnects to
// restart mDNS probing and announcing — all from main loop context so it's
// thread-safe.
this->set_interval(MDNS_UPDATE_INTERVAL_MS, [this]() {
bool connected = network::is_connected();
if (connected && !this->was_connected_) {