Skip to content

Commit 286e8fb

Browse files
committed
Remove unnecessary logging
1 parent efd3e5c commit 286e8fb

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

custom_components/smartthinq_sensors/wideq/devices/dehumidifier.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
from __future__ import annotations
44

5-
import logging
6-
75
from enum import Enum
86

97
from ..backports.functools import cached_property
@@ -47,8 +45,6 @@
4745

4846
ADD_FEAT_POLL_INTERVAL = 300 # 5 minutes
4947

50-
_LOGGER = logging.getLogger(__name__)
51-
5248

5349
class DHumOp(Enum):
5450
"""Whether a device is on or off."""
@@ -324,9 +320,8 @@ def notification_light(self) -> bool | None:
324320
"""Return notification light status."""
325321
try:
326322
key = self._get_state_key(STATE_NOTIFICATION_LIGHT)
327-
except:
323+
except KeyError:
328324
key = None
329-
_LOGGER.exception("LGE ThinQ dehumidifier - unable to get Notification Light status")
330325
if key is None:
331326
ntf_real_value = None
332327
ntf_light_int_value = None
@@ -336,19 +331,19 @@ def notification_light(self) -> bool | None:
336331
ntf_light_int_value = self.to_int_or_none(ntf_real_value)
337332
if ntf_light_int_value is None:
338333
ntf_light_bool_val = None
339-
_LOGGER.warning(f"LGE ThinQ dehumidifier Notification light is {ntf_real_value}. int {ntf_light_int_value}. bool {ntf_light_bool_val}")
340334
elif ntf_light_int_value > 0:
341335
ntf_light_bool_val = True
342336
else:
343337
ntf_light_bool_val = False
344-
if ntf_light_bool_val is not None:
345-
_LOGGER.debug(f"LGE ThinQ dehumidifier Notification light is {ntf_real_value}. int {ntf_light_int_value}. bool {ntf_light_bool_val}")
346-
return self._update_feature(DehumidifierFeatures.NOTIFICATION_LIGHT, ntf_light_bool_val)
338+
return self._update_feature(
339+
DehumidifierFeatures.NOTIFICATION_LIGHT,
340+
ntf_light_bool_val
341+
)
347342

348343
def _update_features(self):
349344
_ = [
350345
self.current_humidity,
351346
self.target_humidity,
352347
self.water_tank_full,
353-
self.notification_light
348+
self.notification_light,
354349
]

0 commit comments

Comments
 (0)