From 96038c664ab2fe5e766461568e62a7e0a5ddc33a Mon Sep 17 00:00:00 2001 From: Cody Cutrer Date: Wed, 22 Mar 2023 09:53:50 -0600 Subject: [PATCH] [mqtt.generic] Don't log state description from provider when not found (#14650) Fixes #9782 Signed-off-by: Cody Cutrer --- .../mqtt/generic/MqttChannelStateDescriptionProvider.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bundles/org.openhab.binding.mqtt.generic/src/main/java/org/openhab/binding/mqtt/generic/MqttChannelStateDescriptionProvider.java b/bundles/org.openhab.binding.mqtt.generic/src/main/java/org/openhab/binding/mqtt/generic/MqttChannelStateDescriptionProvider.java index c146b8b23c6..3b81c30ba0d 100644 --- a/bundles/org.openhab.binding.mqtt.generic/src/main/java/org/openhab/binding/mqtt/generic/MqttChannelStateDescriptionProvider.java +++ b/bundles/org.openhab.binding.mqtt.generic/src/main/java/org/openhab/binding/mqtt/generic/MqttChannelStateDescriptionProvider.java @@ -68,7 +68,9 @@ public class MqttChannelStateDescriptionProvider implements DynamicStateDescript public @Nullable StateDescription getStateDescription(Channel channel, @Nullable StateDescription originalStateDescription, @Nullable Locale locale) { StateDescription description = descriptions.get(channel.getUID()); - logger.trace("Providing state description for channel {}", channel.getUID()); + if (description != null) { + logger.trace("Providing state description for channel {}", channel.getUID()); + } return description; }