diff --git a/itests/org.openhab.binding.mqtt.homeassistant.tests/src/main/java/org/openhab/binding/mqtt/homeassistant/HomeAssistantMQTTImplementationTest.java b/itests/org.openhab.binding.mqtt.homeassistant.tests/src/main/java/org/openhab/binding/mqtt/homeassistant/HomeAssistantMQTTImplementationTest.java index 6e4153b4da1b9..64781741ea182 100644 --- a/itests/org.openhab.binding.mqtt.homeassistant.tests/src/main/java/org/openhab/binding/mqtt/homeassistant/HomeAssistantMQTTImplementationTest.java +++ b/itests/org.openhab.binding.mqtt.homeassistant.tests/src/main/java/org/openhab/binding/mqtt/homeassistant/HomeAssistantMQTTImplementationTest.java @@ -174,11 +174,10 @@ public void parseHATree() throws Exception { assertNull(failure); assertThat(haComponents.size(), is(1)); - String channelGroupId = "switch_" + ThingChannelConstants.TEST_HOME_ASSISTANT_THING.getId(); + String componentId = ThingChannelConstants.TEST_HOME_ASSISTANT_THING.getId(); String channelId = Switch.SWITCH_CHANNEL_ID; - State value = haComponents.get(channelGroupId).getChannel(channelGroupId).getState().getCache() - .getChannelState(); + State value = haComponents.get(componentId).getChannel(channelId).getState().getCache().getChannelState(); assertThat(value, is(UnDefType.UNDEF)); haComponents.values().stream().map(e -> e.start(haConnection, scheduler, 100)) @@ -191,7 +190,7 @@ public void parseHATree() throws Exception { verify(channelStateUpdateListener, timeout(4000).times(1)).updateChannelState(any(), any()); // Value should be ON now. - value = haComponents.get(channelGroupId).getChannel(channelGroupId).getState().getCache().getChannelState(); + value = haComponents.get(componentId).getChannel(channelId).getState().getCache().getChannelState(); assertThat(value, is(OnOffType.ON)); } }