Jelajahi Sumber

light: add debug logging of turn_on parameters

When the service is called, to check the logic it is essential to know
what the actual parameters received were.

Issue #2552
Jason Rumney 1 tahun lalu
induk
melakukan
7e02977648
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      custom_components/tuya_local/light.py

+ 1 - 1
custom_components/tuya_local/light.py

@@ -278,7 +278,7 @@ class TuyaLocalLight(TuyaLocalEntity, LightEntity):
     async def async_turn_on(self, **params):
     async def async_turn_on(self, **params):
         settings = {}
         settings = {}
         color_mode = None
         color_mode = None
-
+        _LOGGER.debug("Light turn_on: %s", params)
         if self._color_mode_dps and ATTR_WHITE in params:
         if self._color_mode_dps and ATTR_WHITE in params:
             if self.color_mode != ColorMode.WHITE:
             if self.color_mode != ColorMode.WHITE:
                 color_mode = ColorMode.WHITE
                 color_mode = ColorMode.WHITE