[mqtt.homeassistant] handle null component name (#15427)
* [mqtt.homeassistant] handle null component name channels from such components will not have a group. this is now done by zigbee2mqtt for the "default" component of a device, such as the light. HASS encourages this as of release 2023.8 Signed-off-by: Cody Cutrer <cody@cutrer.us>
This commit is contained in:
@@ -22,6 +22,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
@@ -160,7 +161,8 @@ public class HomeAssistantMQTTImplementationTest extends MqttOSGiTest {
|
||||
ComponentDiscovered cd = (haID, c) -> {
|
||||
haComponents.put(c.getGroupUID().getId(), c);
|
||||
c.addChannelTypes(channelTypeProvider);
|
||||
channelTypeProvider.setChannelGroupType(c.getGroupTypeUID(), c.getType());
|
||||
channelTypeProvider.setChannelGroupType(Objects.requireNonNull(c.getGroupTypeUID()),
|
||||
Objects.requireNonNull(c.getType()));
|
||||
latch.countDown();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user