2
2
3
3
from __future__ import annotations
4
4
5
- import logging
6
-
7
5
from enum import Enum
8
6
9
7
from ..backports .functools import cached_property
47
45
48
46
ADD_FEAT_POLL_INTERVAL = 300 # 5 minutes
49
47
50
- _LOGGER = logging .getLogger (__name__ )
51
-
52
48
53
49
class DHumOp (Enum ):
54
50
"""Whether a device is on or off."""
@@ -324,9 +320,8 @@ def notification_light(self) -> bool | None:
324
320
"""Return notification light status."""
325
321
try :
326
322
key = self ._get_state_key (STATE_NOTIFICATION_LIGHT )
327
- except :
323
+ except KeyError :
328
324
key = None
329
- _LOGGER .exception ("LGE ThinQ dehumidifier - unable to get Notification Light status" )
330
325
if key is None :
331
326
ntf_real_value = None
332
327
ntf_light_int_value = None
@@ -336,19 +331,19 @@ def notification_light(self) -> bool | None:
336
331
ntf_light_int_value = self .to_int_or_none (ntf_real_value )
337
332
if ntf_light_int_value is None :
338
333
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 } " )
340
334
elif ntf_light_int_value > 0 :
341
335
ntf_light_bool_val = True
342
336
else :
343
337
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
+ )
347
342
348
343
def _update_features (self ):
349
344
_ = [
350
345
self .current_humidity ,
351
346
self .target_humidity ,
352
347
self .water_tank_full ,
353
- self .notification_light
348
+ self .notification_light ,
354
349
]
0 commit comments