-
Notifications
You must be signed in to change notification settings - Fork 591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix one more HA scene problem #256
Conversation
custom_components/localtuya/light.py
Outdated
@@ -188,7 +188,9 @@ def hs_color(self): | |||
"""Return the hs color value.""" | |||
if self.is_color_mode: | |||
return self._hs | |||
if self.supported_features & SUPPORT_COLOR: | |||
if self.supported_features & SUPPORT_COLOR and not self.has_config( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can do this:
if self.supported_features & (SUPPORT_COLOR | SUPPORT_COLOR_TEMP):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a not
, I mean, in case SUPPORT_COLOR but does not SUPPORT_COLOR_TEMP => for RGB +W lights, not RGB + CCT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, right, missed that. But you should be able to use not. self.supported_features & SUPPORT_COLOR_TEMP
for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
…#275 * Fix socket.send() raised exception. * Fix the update_interval create multi tasks. * Adjust the logs to for sub-device and low-power devices. * Add msg for disconnected function. * Workaround to fix heartbeat not being. send because update_interval less then 5 secs. * Handle the fail connection expectations. * Add device ID and Name in logger when add new device.
I create a bunch of scenes with different kind of device configuration:
Found a case that needs this fix 😄