From 56481f3f727db96635cb9d8c5c2caeeb07ac6e93 Mon Sep 17 00:00:00 2001 From: Ben Chadwick Date: Mon, 10 Dec 2018 11:08:53 -0500 Subject: [PATCH] indentation and typo correction --- README.md | 2 +- src/main/java/com/bwssystems/HABridge/hue/ColorDecode.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3c5596e..6de1d38 100644 --- a/README.md +++ b/README.md @@ -489,7 +489,7 @@ For the items that want to have a date time put into the message, utilize ${time Color has been added as a replacement control and the available values are ${color.r}, ${color.g}, ${color.b} which are representations of each color as 0 - 255. There are hex equivalents as well as ${color.rx}, ${color.gx}, ${color.bx} and ${color.rgbx} as 2 place hex representations except for rgbx which is a six place hex representation. -Color can also be replaced with ${color.hsl} which will output a string in the Hue/Saturation/Brightness comma-delineated format, useful for many devices under OpenHAB. The format will be a 0-360 hue value, a 0-100 saturation value, and a 0-100 brightness value, separated by commas. (Such devices usually accept either a full HSB value in that format, or a single ${intensity.percent} value for the dimming value, send as raw text in a POST request.) +Color can also be replaced with ${color.hsl} which will output a string in the Hue/Saturation/Brightness comma-delineated format, useful for many devices under OpenHAB. The format will be a 0-360 hue value, a 0-100 saturation value, and a 0-100 brightness value, separated by commas. (Such devices usually accept either a full HSB value in that format, or a single ${intensity.percent} value for the dimming value, sent as raw text in a POST request.) Special handling for milights is included and is handled by ${color.milight:x}. The usage for that is as follows: udp://ip:port/0x${color.milight:x} where x is a number between 0 and 4 (0 all groups, 1-4 specific group). The group is necessary in case the color turns out to be white. The correct group on must of course be sent before that udp packet. Note that milight can only use 255 colors and white is handled completely separate for the rgbw strips, so setting temperature via ct with milight does something but not really the desired result diff --git a/src/main/java/com/bwssystems/HABridge/hue/ColorDecode.java b/src/main/java/com/bwssystems/HABridge/hue/ColorDecode.java index 2ff2f7a..ad9a3af 100644 --- a/src/main/java/com/bwssystems/HABridge/hue/ColorDecode.java +++ b/src/main/java/com/bwssystems/HABridge/hue/ColorDecode.java @@ -209,7 +209,7 @@ public class ColorDecode { float bright = hsb[2] * (float) 100.0; request = request.replace(COLOR_HSL, String.format("%f,%f,%f", hue, sat, bright)); notDone = true; - } + } Matcher m = COLOR_MILIGHT.matcher(request); while (m.find()) {