-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[hue] Improvements for exotic light models #21062
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
andrewfg
wants to merge
41
commits into
openhab:main
Choose a base branch
from
andrewfg:hue-min-dim-level
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 34 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
86e9bf5
tweak default minimum dimming level
andrewfg 5d6fbc6
fix for signe lamps
andrewfg d4aebc0
tweak precision
andrewfg 698dc1a
add min dim level config param
andrewfg 2daf740
self documenting minimum value
andrewfg 7947690
add support for manual mirek schema
andrewfg 9e39ca8
refine manual mirek stuff
andrewfg 2664a45
shorten variable names
andrewfg 660c091
fix log level
andrewfg b9a115e
oops
andrewfg a8a88d9
doc
andrewfg f0c24af
various
andrewfg ba8a444
fix build
andrewfg f7fbce4
refine 'setters' helpers
andrewfg 9b4b7d2
various
andrewfg da15d4a
bug fixes
andrewfg 3169984
tweaks
andrewfg 634e0bc
various
andrewfg 962d2b7
cosmetic
andrewfg 1e208e7
various
andrewfg 2987514
refactor
andrewfg 86c02de
reduce deltas
andrewfg 5a8723b
adopt some copilot suggestions
andrewfg 12c81e2
extend lk wiser fix to tradfri bulbs too
andrewfg f2f1be5
javadoc fixes
andrewfg 2a71439
various
andrewfg f230521
apply work around to bridge home
andrewfg 556623c
Merge remote-tracking branch 'upstream/main' into hue-min-dim-level
andrewfg b968318
spotless on pom
andrewfg c208472
unfix pom
andrewfg 583cf13
tweak java doc and variable name
andrewfg 586232b
work-around check children recursively
andrewfg 060efbf
javadoc
andrewfg 0029adf
remove duplicate code
andrewfg 58c0580
adopt copilot suggestions
andrewfg d31aebe
revert mess caused by copilot wrong suggestion
andrewfg ec566b1
Merge branch 'openhab:main' into hue-min-dim-level
andrewfg e68e3ef
use regex pattern for workaround check
andrewfg f49a26c
Merge remote-tracking branch 'upstream/main' into hue-min-dim-level
andrewfg 7de6c8f
fix pattern matcher
andrewfg ce878c3
remove annotation
andrewfg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
49 changes: 49 additions & 0 deletions
49
...e/src/main/java/org/openhab/binding/hue/internal/api/dto/clip2/ColorTemperatureDelta.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| /* | ||
| * Copyright (c) 2010-2026 Contributors to the openHAB project | ||
| * | ||
| * See the NOTICE file(s) distributed with this work for additional | ||
| * information. | ||
| * | ||
| * This program and the accompanying materials are made available under the | ||
| * terms of the Eclipse Public License 2.0 which is available at | ||
| * http://www.eclipse.org/legal/epl-2.0 | ||
| * | ||
| * SPDX-License-Identifier: EPL-2.0 | ||
| */ | ||
| package org.openhab.binding.hue.internal.api.dto.clip2; | ||
|
|
||
| import org.eclipse.jdt.annotation.NonNullByDefault; | ||
| import org.eclipse.jdt.annotation.Nullable; | ||
| import org.openhab.binding.hue.internal.api.dto.clip2.enums.ActionDeltaType; | ||
| import org.openhab.core.library.types.IncreaseDecreaseType; | ||
|
|
||
| import com.google.gson.annotations.SerializedName; | ||
|
|
||
| /** | ||
| * DTO for color temperature delta of a light. | ||
| * | ||
| * @author Andrew Fiddian-Green - Initial contribution | ||
| */ | ||
| @NonNullByDefault | ||
| public class ColorTemperatureDelta { | ||
| private @Nullable String action; | ||
| private @SerializedName("mirek_delta") int mirekDelta; | ||
|
|
||
| public @Nullable String getAction() { | ||
| return action; | ||
| } | ||
|
|
||
| public int getMirekDelta() { | ||
| return mirekDelta; | ||
| } | ||
|
|
||
| public ColorTemperatureDelta setAction(IncreaseDecreaseType action) { | ||
| this.action = ActionDeltaType.of(action).name().toLowerCase(); | ||
| return this; | ||
| } | ||
|
|
||
| public ColorTemperatureDelta setDelta(int mirekDelta) { | ||
| this.mirekDelta = mirekDelta; | ||
| return this; | ||
| } | ||
| } |
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
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
49 changes: 49 additions & 0 deletions
49
...inding.hue/src/main/java/org/openhab/binding/hue/internal/api/dto/clip2/DimmingDelta.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| /* | ||
| * Copyright (c) 2010-2026 Contributors to the openHAB project | ||
| * | ||
| * See the NOTICE file(s) distributed with this work for additional | ||
| * information. | ||
| * | ||
| * This program and the accompanying materials are made available under the | ||
| * terms of the Eclipse Public License 2.0 which is available at | ||
| * http://www.eclipse.org/legal/epl-2.0 | ||
| * | ||
| * SPDX-License-Identifier: EPL-2.0 | ||
| */ | ||
| package org.openhab.binding.hue.internal.api.dto.clip2; | ||
|
|
||
| import org.eclipse.jdt.annotation.NonNullByDefault; | ||
| import org.eclipse.jdt.annotation.Nullable; | ||
| import org.openhab.binding.hue.internal.api.dto.clip2.enums.ActionDeltaType; | ||
| import org.openhab.core.library.types.IncreaseDecreaseType; | ||
|
|
||
| import com.google.gson.annotations.SerializedName; | ||
|
|
||
| /** | ||
| * DTO for dimming delta of a light. | ||
| * | ||
| * @author Andrew Fiddian-Green - Initial contribution | ||
| */ | ||
| @NonNullByDefault | ||
| public class DimmingDelta { | ||
| private @Nullable String action; | ||
| private @Nullable @SerializedName("brightness_delta") Double brightnessDelta; | ||
|
|
||
| public @Nullable String getAction() { | ||
| return action; | ||
| } | ||
|
|
||
| public @Nullable Double getBrightnessDelta() { | ||
| return brightnessDelta; | ||
| } | ||
|
|
||
| public DimmingDelta setAction(IncreaseDecreaseType action) { | ||
| this.action = ActionDeltaType.of(action).name().toLowerCase(); | ||
| return this; | ||
| } | ||
|
|
||
| public DimmingDelta setDelta(Double delta) { | ||
| this.brightnessDelta = delta; | ||
| return this; | ||
| } | ||
| } |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.