Skip to content
This repository has been archived by the owner on Jun 16, 2024. It is now read-only.

Fix TypeError issue; send zeroes for RGB/W if dimmer is zero; improve logging #38

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

ruth-connect
Copy link

No description provided.

@@ -323,18 +323,21 @@ def dmx_values(self):
return color_rgb_to_rgbw(*scaled_rgb)
elif self._type == CONF_LIGHT_TYPE_DRGB:
drgb = [self._brightness]
drgb.extend(self._rgb)
drgb.extend(self._rgb if self._brightness > 0 else [0, 0, 0])
_LOGGER.debug("drgb: " + ', '.join([str(x) for x in drgb]));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Ruth, sorry for the delay in getting to this. Can you help me understand why the RGB values should be zeroed for these lights? In my mind that's what the dimmer channel is there for.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was probably me being paranoid in the DRGB case then; however it won't do any harm for the RGB values to be zero if the dimmer channel is also zero, as the end result will be no light output either way.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants