Skip to content

Commit 2a3b197

Browse files
committed
Simplify sendColors() color-mode guard now that inColor is properly set
Since fillRgbwSettings() now correctly sets profile.inColor for Gen2 RGBW PM, the redundant (isGen2 && isRGBW2) clause in sendColors() is no longer needed — profile.inColor alone is the right gate. Signed-off-by: Markus Michels <markus7017@gmail.com>
1 parent 7a3519a commit 2a3b197

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/handler

bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/handler/ShellyLightHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ private void sendColors(ShellyDeviceProfile profile, Integer lightId, ShellyColo
467467
if (autoOn && (newCol.brightness >= 0)) {
468468
parms.put(SHELLY_LIGHT_TURN, profile.inColor || newCol.brightness > 0 ? SHELLY_API_ON : SHELLY_API_OFF);
469469
}
470-
if (profile.inColor || (profile.isGen2 && profile.isRGBW2)) {
470+
if (profile.inColor) {
471471
if (oldCol.red != newCol.red || oldCol.green != newCol.green || oldCol.blue != newCol.blue
472472
|| oldCol.white != newCol.white) {
473473
logger.debug("{}: Setting RGBW to {}/{}/{}/{}", thingName, newCol.red, newCol.green, newCol.blue,

0 commit comments

Comments
 (0)