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

Kelvin range too limiting #4

Closed
danVnest opened this issue Jul 17, 2020 · 2 comments
Closed

Kelvin range too limiting #4

danVnest opened this issue Jul 17, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@danVnest
Copy link

danVnest commented Jul 17, 2020

The WiZ G95 and WiZ C35 lights colour temperature ranges from 2000 to 4500.
I've successfully tested both with echo '{"method":"setPilot","params":{"temp":2000}}' | nc -u -w 1 192.168.30.10 38899.

Can you adjust the _set_colortemp method in bulb.py to be less restrictive?
From my testing with these lights, anything less than 1000 kelvin, or more than 12000 kelvin results in an "Invalid params" response. Thankfully the light seems to have its own check - if you command 1000 kelvin, it will default to 2000 (and 12000 defaults to 4500).

Hopefully the above is true for all other WiZ lights.

Perhaps use:

def _set_colortemp(self, kelvin: int):
  """Set the color temperature for the white led in the bulb."""
  if kelvin < 1000:
    kelvin = 1000
  elif kelvin > 12000:
    kelvin = 12000
  self.pilot_params["temp"] = kelvin
@sbidy sbidy self-assigned this Jul 17, 2020
@sbidy sbidy added the enhancement New feature or request label Jul 17, 2020
@danVnest
Copy link
Author

Addressed in pull request #7

@sbidy
Copy link
Owner

sbidy commented Oct 1, 2020

added in 0.3.3 - thanks!

@sbidy sbidy closed this as completed Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants