From 10a3259ddae70fba59822dc9093328a79d57d179 Mon Sep 17 00:00:00 2001 From: Cody Cutrer Date: Mon, 7 Oct 2024 15:20:27 -0600 Subject: [PATCH] fix itests Signed-off-by: Cody Cutrer --- .../homeassistant/HomeAssistantMQTTImplementationTest.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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)); } }