Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Commit

Permalink
Merge branch 'bulbconfig' of https://github.com/sbidy/wiz_light into …
Browse files Browse the repository at this point in the history
…bulbconfig
  • Loading branch information
sbidy committed Dec 9, 2020
2 parents f05a88c + 3829637 commit f8e873c
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 19 deletions.
12 changes: 0 additions & 12 deletions .github/FUNDING.yml

This file was deleted.

27 changes: 23 additions & 4 deletions .github/ISSUE_TEMPLATE/bulb-test-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,42 @@ assignees: sbidy

Provide the following information:

1. Made an UDP request with nc to the bulb:
**1. Made an UDP request with `nc` to the bulb:**
`echo '{"method":"getSystemConfig","params":{}}' | nc -u -w 1 <YOU BULB IP> 38899`
Report the output here:

2. Provide the native features of the bulb:

**2. Provide the native features of the bulb:**
- Dimmer (yes/no):
- Color Temp (yes/no):
- Effects (yes/no):
- RGB (yes/no):

3. Tested?

**3. Tested?**
yes/no
If you found bug or problems with the bulb please open an new issue and add a reference to this one.


**OPTIONAL**

**4. Prepare the YAML - replace `<Name>` with the ESP_XXXXXXXX name from step 1.**
```
<Name>:
name: <Name>
features:
brightness: true / false
color: true / false
effect: true / false
color_tmp: true / false
kelvin_range:
min: 2200 / or other?
max: 6500 / or other?
```

**Additional Info**
Add any other useful information about the bulb? Purchase link? Other stuff you want to share?

**Thank you for your support** We will integrate the bulb as soon as possible.
**Thank you for your support**

We will integrate the bulb as soon as possible.
14 changes: 11 additions & 3 deletions custom_components/wiz_light/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@ async def async_turn_on(self, **kwargs):
kwargs[ATTR_COLOR_TEMP]
)
colortemp = kelvin
_LOGGER.debug("[wizlight %s] kelvin changed and send to bulb: %s", self._light.ip, colortemp)
_LOGGER.debug(
"[wizlight %s] kelvin changed and send to bulb: %s",
self._light.ip,
colortemp,
)

sceneid = None
if ATTR_EFFECT in kwargs:
Expand Down Expand Up @@ -249,7 +253,9 @@ def update_temperature(self):
if colortemp is None or colortemp == 0:
return
try:
_LOGGER.debug("[wizlight %s] kelvin from the bulb: %s", self._light.ip, colortemp)
_LOGGER.debug(
"[wizlight %s] kelvin from the bulb: %s", self._light.ip, colortemp
)
temperature = color_utils.color_temperature_kelvin_to_mired(colortemp)
self._temperature = temperature

Expand Down Expand Up @@ -308,7 +314,9 @@ def read_bulblib(self):
with open(os.path.join(__location__, "bulblibrary.yaml")) as f:
lib = yaml.safe_load(f)
# get version
_LOGGER.debug("Bulb Library YAML loaded in version %s", lib.get('Version'))
_LOGGER.debug(
"Bulb Library YAML loaded in version %s", lib.get("Version")
)
return lib
except FileNotFoundError:
_LOGGER.error(
Expand Down

0 comments on commit f8e873c

Please sign in to comment.