Skip to content
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

Initial support for milight white bulbs #43

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

Conversation

bjornhij
Copy link

@bjornhij bjornhij commented Jan 4, 2016

Color and brightness UI elements still there, but unusable.

@bjornhij
Copy link
Author

bjornhij commented Jan 4, 2016

See #42

color = Color(@color).rgb()
@device.sendCommands(nodeMilight.commands.rgbw.rgb255(color.r, color.g, color.b))

if @config.type == "White"
Copy link
Owner

Choose a reason for hiding this comment

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

I would prefer to have the bulb types as static var of the Milight class:

class Milight extends BaseLedLight
  @BULB_TYPE:
     WHITE: 'White'
     COLOR: 'Color'

  ...
    turnOn: ->
      ...
      if @config.type is Milight.BULB_TYPE.WHITE

@philip1986
Copy link
Owner

Yeah, thx for contributing! @mwittig said here he will check the functionally, I just have those two minor objections I already mentioned before.

I will also check if we can do something about the UI for this type of bulbs.

@mwittig
Copy link
Collaborator

mwittig commented Jan 5, 2016

@philip1986 I don't think we should add a type property to the Milight device class as suggested by @bjornhij, but there should a new device class for this. Note, the contributed code does not handle dimming which works a lot different from RGBW dimming. With CW/WW LEDs the command set does not provide dimming value, but it provides commands to increase and decrease brightness. So, CW/WW need a UI class of its own.

@philip1986
Copy link
Owner

@mwittig ok I got your point and I agree.
I think for this bulbs the UI of dummy dimmer might be good enough.

@bjornhij
Copy link
Author

I've created a new MilightCWWW class. Still figuring out how I can use another UI class.

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

Successfully merging this pull request may close these issues.

3 participants