Skip to content

Commit

Permalink
Merge pull request #5 from jfarmer08/Dev
Browse files Browse the repository at this point in the history
Add support for E11-N1EA Bulb
  • Loading branch information
jfarmer08 authored Aug 6, 2020
2 parents c4b1144 + 7b8c291 commit af66c49
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion custom_components/sengledapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async def async_setup(hass, config):
-------------------------------------------------------------------
Sengled Bulb Home Assistant Integration
Version: v0.1-beta.5
Version: v0.1-beta.6
This is a custom integration
If you have any issues with this you need to open an issue here:
Expand Down
17 changes: 14 additions & 3 deletions custom_components/sengledapi/sengledapi/sengledapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ async def async_list_bulbs(self):
self._country,
)
)
if (
light["attributes"]["productCode"] == "E1A-AC2"
): # Light Currently only one i have
if light["attributes"]["productCode"] == "E11-N1EA":
bulbs.append(
SengledBulb(
self,
Expand All @@ -118,6 +116,19 @@ async def async_list_bulbs(self):
self._country,
)
)
if light["attributes"]["productCode"] == "E1A-AC2":
bulbs.append(
SengledBulb(
self,
light["deviceUuid"],
light["attributes"]["name"],
("on" if light["attributes"]["onoff"] == 1 else "off"),
light["attributes"]["productCode"],
light["attributes"]["brightness"],
self._access_token,
self._country,
)
)

return bulbs

Expand Down

0 comments on commit af66c49

Please sign in to comment.