ソースを参照

light: fix incorect device reference when turning off effects

Issue #2135
Jason Rumney 1 年間 前
コミット
c3a8a7685c
1 ファイル変更1 行追加1 行削除
  1. 1 1
      custom_components/tuya_local/light.py

+ 1 - 1
custom_components/tuya_local/light.py

@@ -357,7 +357,7 @@ class TuyaLocalLight(TuyaLocalEntity, LightEntity):
                         # effect, use the default, or first in the list
                         # effect, use the default, or first in the list
                         effect = (
                         effect = (
                             self._color_mode_dps.default
                             self._color_mode_dps.default
-                            or self._color_mode_dps.values(self.device)[0]
+                            or self._color_mode_dps.values(self._device)[0]
                         )
                         )
                     _LOGGER.debug(
                     _LOGGER.debug(
                         "Emulating effect using color mode of %s",
                         "Emulating effect using color mode of %s",