feat(inputs.huebridge): Add brightness and color fields to light metric#18739
Merged
skartikey merged 2 commits intoinfluxdata:masterfrom Apr 21, 2026
Merged
Conversation
…coordinates to huebridge metrics
Contributor
|
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
srebhan
approved these changes
Apr 20, 2026
Member
srebhan
left a comment
There was a problem hiding this comment.
Thanks a lot @rogiervandergeer!
skartikey
approved these changes
Apr 21, 2026
Contributor
skartikey
left a comment
There was a problem hiding this comment.
@rogiervandergeer Thanks for the contribution!
hdecarne
added a commit
to hdecarne/telegraf
that referenced
this pull request
Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
inputs.huebridgeplugin currently only emits anonfield for each light, which makes it impossible to track brightness or color state through Telegraf. This PR adds four new fields to thehuebridge_lightmetric:brightness(float, 0–100) — current brightness percentage for dimmable lightscolor_temp(int) — color temperature in mireds when the light is in the CT spectrumcolor_x,color_y(float) — CIE xy color point for color-capable lightsAll four fields are already present in the existing
GetLights()response from the Hue v2 API, so no additional API calls, dependency changes, or plugin configuration are needed. Each field is emitted only when the light reports it (e.g.brightnessis absent for non-dimmable lights,color_x/color_yare absent for white-only lights), matching the nil-guard pattern used byprocessDevicePowers().Users who want to suppress specific fields can use the standard
fieldexclude/fieldpassTelegraf options; no plugin-level toggles are added.Changes
plugins/inputs/huebridge/bridge.go— add four field emissions inprocessLights(), each guarded by its own nil check.plugins/inputs/huebridge/README.md— document the new fields underhuebridge_light.plugins/inputs/huebridge/testdata/metrics/huebridge.txt— regenerated from the existing mock to include the new field values. No changes to the mock itself —go-hue's built-inmock.jsonalready containsdimming,color, andcolor_temperaturedata on its light records.Checklist
Related issues
resolves #18738