Skip to content

Skip empty supported_color_modes in MQTT light discovery#663

Open
jasonjrowe wants to merge 2 commits into
wez:mainfrom
jasonjrowe:main
Open

Skip empty supported_color_modes in MQTT light discovery#663
jasonjrowe wants to merge 2 commits into
wez:mainfrom
jasonjrowe:main

Conversation

@jasonjrowe
Copy link
Copy Markdown

No description provided.

florianhorner added a commit to florianhorner/govee2mqtt-extended that referenced this pull request May 30, 2026
…ez#662) (#25)

* fix(light): omit empty supported_color_modes from HA discovery

An on/off-only light (no rgb, no color_temp) produced an empty
`supported_color_modes` vec that serialized as `[]`. Home Assistant
rejects MQTT light discovery configs with an empty color-mode list and
drops the entity. Add `skip_serializing_if = "Vec::is_empty"` so the
field is omitted in that case, plus serialization regression tests.

Ported from upstream wez#663 by @jasonjrowe.

Co-Authored-By: jasonjrowe <125322486+jasonjrowe@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* feat: add options to disable or filter published effect lists

Why: Google Home integration breaks when the published effect list exceeds
its discovery payload limit; operators need a way to suppress or whitelist
effects.

Add GOVEE_DISABLE_EFFECTS and GOVEE_ALLOWED_EFFECTS env vars (plus addon
config + translations) so users can suppress or whitelist published effect
lists. Also sets the discovery `effect` flag from the resulting list instead
of hardcoding true.

Conflict resolution preserved the fork's 2FA_CODE env redaction and reworded
global_broadcast help text.

Ported from upstream wez#662 by @adaofeliz.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: jasonjrowe <125322486+jasonjrowe@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: adaofeliz <adaofeliz@users.noreply.github.com>
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