From 1373f6866a018523f17f4a067d2f8961f1df3e5d Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 19 Feb 2026 00:33:06 -0600 Subject: [PATCH] [e131] Fix IGMP rejoin after effect stop/start cycle When leave_() decremented consumers to 0 without removing the entry, a subsequent join_() would find it, increment 0->1, and return early without rejoining the IGMP multicast group. Now join_() only skips the IGMP rejoin when consumers was already > 0. --- esphome/components/e131/e131_packet.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/esphome/components/e131/e131_packet.cpp b/esphome/components/e131/e131_packet.cpp index e1648a099b8..b334100ad16 100644 --- a/esphome/components/e131/e131_packet.cpp +++ b/esphome/components/e131/e131_packet.cpp @@ -98,12 +98,13 @@ void E131Component::join_(int universe) { // store only latest received packet for the given universe auto *consumer = this->find_universe_(universe); if (consumer != nullptr) { - consumer->consumers++; - return; // we already joined before + if (consumer->consumers++ > 0) { + return; // we already joined before + } + } else { + this->universe_consumers_.push_back({static_cast(universe), 1}); } - this->universe_consumers_.push_back({static_cast(universe), 1}); - if (this->join_igmp_groups_()) { ESP_LOGD(TAG, "Joined %d universe for E1.31.", universe); }