[yeelight] Deprecations (#20870)

* [yeelight] Deprecations

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
Holger Friedrich
2026-06-10 19:03:01 +02:00
committed by GitHub
parent 470a9a1452
commit 78f0ad7dc1
2 changed files with 5 additions and 2 deletions
@@ -40,6 +40,7 @@ import org.openhab.core.thing.ThingTypeUID;
import org.openhab.core.thing.binding.BaseThingHandler;
import org.openhab.core.types.Command;
import org.openhab.core.types.RefreshType;
import org.openhab.core.util.ColorUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -288,7 +289,7 @@ public abstract class YeelightHandlerBase extends BaseThingHandler
void handleHSBCommand(HSBType color) {
DeviceAction cAction = DeviceAction.color;
cAction.putValue(color.getRGB() & 0xFFFFFF);
cAction.putValue(ColorUtil.hsbTosRgb(color) & 0xFFFFFF);
cAction.putDuration(getDuration());
DeviceManager.getInstance().doAction(deviceId, cAction);
}
@@ -16,6 +16,7 @@ import java.awt.Color;
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.MulticastSocket;
import java.net.NetworkInterface;
import java.net.SocketException;
@@ -127,7 +128,8 @@ public class DeviceManager {
try (MulticastSocket multiSocket = new MulticastSocket(MULTI_CAST_PORT)) {
multiSocket.setSoTimeout(TIMEOUT);
multiSocket.setNetworkInterface(networkInterface);
multiSocket.joinGroup(multicastAddress);
multiSocket.joinGroup(new InetSocketAddress(multicastAddress, MULTI_CAST_PORT),
networkInterface);
DatagramPacket dpSend = new DatagramPacket(DISCOVERY_MSG.getBytes(),
DISCOVERY_MSG.getBytes().length, multicastAddress, MULTI_CAST_PORT);