소스 검색

Formatting

Jon 3 년 전
부모
커밋
d4a2b06b4e
1개의 변경된 파일1개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 4
      custom_components/tuya_local/light.py

+ 1 - 4
custom_components/tuya_local/light.py

@@ -214,10 +214,7 @@ class TuyaLocalLight(TuyaLocalEntity, LightEntity):
         if self._color_mode_dps and ATTR_WHITE in params:
             if self.color_mode != ColorMode.WHITE:
                 color_mode = ColorMode.WHITE
-            if (
-               ATTR_BRIGHTNESS not in params
-               and self._brightness_dps
-             ):
+            if ATTR_BRIGHTNESS not in params and self._brightness_dps:
                 bright = params.get(ATTR_WHITE)
                 _LOGGER.debug(f"Setting brightness via WHITE parameter to {bright}")
                 settings = {