]> git.basschouten.com Git - openhab-addons.git/commitdiff
Fix logging (#17119)
authorlsiepel <leosiepel@gmail.com>
Mon, 12 Aug 2024 11:10:29 +0000 (13:10 +0200)
committerGitHub <noreply@github.com>
Mon, 12 Aug 2024 11:10:29 +0000 (13:10 +0200)
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
bundles/org.openhab.binding.samsungtv/src/main/java/org/openhab/binding/samsungtv/internal/handler/SamsungTvHandler.java

index c94c3c9f622a97f3275afafdf9748b2e14707a0b..3c33af5681882474185c625e0de1df0a79255676 100755 (executable)
@@ -198,7 +198,10 @@ public class SamsungTvHandler extends BaseThingHandler implements RegistryListen
                 // @Nullable
                 String response = HttpUtil.executeUrl("GET", uri.toURL().toString(), 500);
                 properties = Optional.ofNullable(new Gson().fromJson(response, TVProperties.class));
-            } catch (JsonSyntaxException | URISyntaxException | IOException e) {
+            } catch (IOException e) {
+                logger.debug("{}: Cannot connect to TV: {}", host, e.getMessage());
+                properties = Optional.empty();
+            } catch (JsonSyntaxException | URISyntaxException e) {
                 logger.warn("{}: Cannot connect to TV: {}", host, e.getMessage());
                 properties = Optional.empty();
             }
@@ -229,7 +232,7 @@ public class SamsungTvHandler extends BaseThingHandler implements RegistryListen
         } catch (InterruptedException | ExecutionException e) {
             logger.warn("{}: Cannot get TVProperties: {}", host, e.getMessage());
         }
-        logger.warn("{}: Cannot get TVProperties, return Empty properties", host);
+        logger.debug("{}: Cannot get TVProperties, return Empty properties", host);
         return new TVProperties();
     }