|
|
@@ -296,6 +296,7 @@ class TuyaLocalLight(TuyaLocalEntity, LightEntity):
|
|
|
**self._brightness_dps.get_values_to_set(
|
|
|
self._device,
|
|
|
bright,
|
|
|
+ settings,
|
|
|
),
|
|
|
}
|
|
|
elif self._color_temp_dps and ATTR_COLOR_TEMP_KELVIN in params:
|
|
|
@@ -316,6 +317,7 @@ class TuyaLocalLight(TuyaLocalEntity, LightEntity):
|
|
|
**self._color_temp_dps.get_values_to_set(
|
|
|
self._device,
|
|
|
color_temp,
|
|
|
+ settings,
|
|
|
),
|
|
|
}
|
|
|
elif self._rgbhsv_dps and (
|
|
|
@@ -382,6 +384,7 @@ class TuyaLocalLight(TuyaLocalEntity, LightEntity):
|
|
|
**self._rgbhsv_dps.get_values_to_set(
|
|
|
self._device,
|
|
|
self._rgbhsv_dps.encode_value(binary),
|
|
|
+ settings,
|
|
|
),
|
|
|
}
|
|
|
elif self._named_color_dps and ATTR_HS_COLOR in params:
|
|
|
@@ -397,6 +400,7 @@ class TuyaLocalLight(TuyaLocalEntity, LightEntity):
|
|
|
**self._named_color_dps.get_values_to_set(
|
|
|
self._device,
|
|
|
best_match,
|
|
|
+ settings,
|
|
|
),
|
|
|
}
|
|
|
if self._color_mode_dps:
|
|
|
@@ -407,6 +411,7 @@ class TuyaLocalLight(TuyaLocalEntity, LightEntity):
|
|
|
**self._color_mode_dps.get_values_to_set(
|
|
|
self._device,
|
|
|
color_mode,
|
|
|
+ settings,
|
|
|
),
|
|
|
}
|
|
|
elif not self._effect_dps:
|
|
|
@@ -429,6 +434,7 @@ class TuyaLocalLight(TuyaLocalEntity, LightEntity):
|
|
|
**self._color_mode_dps.get_values_to_set(
|
|
|
self._device,
|
|
|
effect,
|
|
|
+ settings,
|
|
|
),
|
|
|
}
|
|
|
|
|
|
@@ -449,6 +455,7 @@ class TuyaLocalLight(TuyaLocalEntity, LightEntity):
|
|
|
**self._brightness_dps.get_values_to_set(
|
|
|
self._device,
|
|
|
bright,
|
|
|
+ settings,
|
|
|
),
|
|
|
}
|
|
|
|
|
|
@@ -461,6 +468,7 @@ class TuyaLocalLight(TuyaLocalEntity, LightEntity):
|
|
|
**self._effect_dps.get_values_to_set(
|
|
|
self._device,
|
|
|
effect,
|
|
|
+ settings,
|
|
|
),
|
|
|
}
|
|
|
|
|
|
@@ -474,11 +482,11 @@ class TuyaLocalLight(TuyaLocalEntity, LightEntity):
|
|
|
# that have tristate switch available as effect
|
|
|
if self._effect_dps.id not in settings:
|
|
|
settings = settings | self._effect_dps.get_values_to_set(
|
|
|
- self._device, "on"
|
|
|
+ self._device, "on", settings
|
|
|
)
|
|
|
else:
|
|
|
settings = settings | self._switch_dps.get_values_to_set(
|
|
|
- self._device, True
|
|
|
+ self._device, True, settings
|
|
|
)
|
|
|
elif self._brightness_dps and not self.is_on:
|
|
|
bright = 255
|
|
|
@@ -487,7 +495,7 @@ class TuyaLocalLight(TuyaLocalEntity, LightEntity):
|
|
|
bright = color_util.brightness_to_value(r, bright)
|
|
|
|
|
|
settings = settings | self._brightness_dps.get_values_to_set(
|
|
|
- self._device, bright
|
|
|
+ self._device, bright, settings
|
|
|
)
|
|
|
|
|
|
if settings:
|