From 1a4cebd2816ef149e461e6b129e8ac380e1593e0 Mon Sep 17 00:00:00 2001 From: Holger Friedrich Date: Wed, 1 Jan 2025 23:16:14 +0100 Subject: [PATCH] [mqtt.homeassistant] Fix build (#18014) Signed-off-by: Holger Friedrich --- .../homeassistant/internal/component/AbstractComponent.java | 2 +- .../mqtt/homeassistant/internal/component/ClimateTests.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/AbstractComponent.java b/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/AbstractComponent.java index 689ddd37372..d7c19f863ff 100644 --- a/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/AbstractComponent.java +++ b/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/AbstractComponent.java @@ -210,7 +210,7 @@ public abstract class AbstractComponent protected ComponentChannel.Builder buildChannel(String channelID, ComponentChannelType channelType, Value valueState, String label, ChannelStateUpdateListener channelStateUpdateListener) { - if (groupId == null && newStyleChannels) { + if (groupId == null) { channelID = componentId; } return new ComponentChannel.Builder(this, channelID, channelType.getChannelTypeUID(), valueState, label, diff --git a/bundles/org.openhab.binding.mqtt.homeassistant/src/test/java/org/openhab/binding/mqtt/homeassistant/internal/component/ClimateTests.java b/bundles/org.openhab.binding.mqtt.homeassistant/src/test/java/org/openhab/binding/mqtt/homeassistant/internal/component/ClimateTests.java index fe3a6d3183a..2d456205233 100644 --- a/bundles/org.openhab.binding.mqtt.homeassistant/src/test/java/org/openhab/binding/mqtt/homeassistant/internal/component/ClimateTests.java +++ b/bundles/org.openhab.binding.mqtt.homeassistant/src/test/java/org/openhab/binding/mqtt/homeassistant/internal/component/ClimateTests.java @@ -452,10 +452,10 @@ public class ClimateTests extends AbstractComponentTests { assertChannel(component, Climate.ACTION_CH_ID, "living-room-tion-3s/climate/living-room-tion-3s/action/state", "", "living-room-tion-3s", TextValue.class); - assertChannel(component, Climate.CURRENT_TEMPERATURE_CH_ID_DEPRECATED, + assertChannel(component, Climate.CURRENT_TEMPERATURE_CH_ID, "living-room-tion-3s/climate/living-room-tion-3s/current_temperature/state", "", "living-room-tion-3s", NumberValue.class); - assertChannel(component, Climate.FAN_MODE_CH_ID_DEPRECATED, + assertChannel(component, Climate.FAN_MODE_CH_ID, "living-room-tion-3s/climate/living-room-tion-3s/fan_mode/state", "living-room-tion-3s/climate/living-room-tion-3s/fan_mode/command", "living-room-tion-3s", TextValue.class);