Skip to content

ina2xx_v2: re-send HA discovery after MQTT reconnect (CodeRabbit round 3) - #62

Merged
KrX3D merged 1 commit into
0_15from
fix/ina2xx-v2-coderabbit-round3
Dec 3, 2026
Merged

KrX3D merged 1 commit into
0_15from
fix/ina2xx-v2-coderabbit-round3

Conversation

@KrX3D

@KrX3D KrX3D commented Dec 1, 2026

Copy link
Copy Markdown
Owner
  • onMqttConnect() sets haDiscoverySent = !haDiscovery, so the HA discovery configs (or their removal) are sent again after every MQTT reconnect. AsyncMqttClient drops queued QoS-0 messages on disconnect, so configs queued just before a connection drop were never retried. All of these messages are retained, so sending them again does no harm.
  • Fixes the CodeRabbit finding on Usermod INA219 + INA226 Current, Voltage & Power Sensor wled/WLED#4237 (review 6137802132, inline comment 4759202728).
  • Compiles for esp32dev INA219, esp32dev INA226 (WLED_DEBUG) and nodemcuv2 INA219 with 0 usermod warnings.

Changelog

  • 2026-12-01: created.

🤖 Generated with Claude Code

AsyncMqttClient drops queued QoS-0 messages on disconnect, so discovery configs
(or their removal) queued just before a drop were never retried. onMqttConnect()
now re-arms haDiscoverySent; the messages are retained, so repeats are harmless.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@KrX3D
KrX3D merged commit 85f2576 into 0_15 Dec 3, 2026
@KrX3D
KrX3D deleted the fix/ina2xx-v2-coderabbit-round3 branch December 3, 2026 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant