Skip to content

Commit

Permalink
Handle brightness value if mode is not white. #114
Browse files Browse the repository at this point in the history
  • Loading branch information
xZetsubou authored Feb 10, 2024
1 parent 3989420 commit c93c133
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/localtuya/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ async def async_turn_on(self, **kwargs):
self._lower_brightness,
self._upper_brightness,
)
if self.is_white_mode:
if self.is_white_mode or self.dp_value(CONF_COLOR) is None:
states[self._config.get(CONF_BRIGHTNESS)] = brightness
else:
if self.__is_color_rgb_encoded():
Expand Down

0 comments on commit c93c133

Please sign in to comment.