Skip to content

Commit

Permalink
Support 2 models of String Lights
Browse files Browse the repository at this point in the history
Support HB-10521-HS and maybe HB-17122-HS-WT 
Thanks @SmileyDan-84
  • Loading branch information
jdeath authored Jul 2, 2023
1 parent 1b010ee commit 409bb56
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions custom_components/hubspace/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def setup_platform(
_LOGGER.debug("deviceClass: " + deviceClass)

if deviceClass == "fan" and model == "":
model = "DriskolFan"
model == "DriskolFan"

entities = _add_entity(entities, hs, model, deviceClass, friendlyName, debug)

Expand All @@ -165,7 +165,7 @@ def setup_platform(
_LOGGER.debug("friendlyName: " + friendlyName)

if deviceClass == "fan" and model == "":
model = "DriskolFan"
model == "DriskolFan"

entities = _add_entity(
entities, hs, model, deviceClass, friendlyName, debug
Expand All @@ -190,7 +190,7 @@ def setup_platform(

if deviceClass == "fan":
if model == "":
model = "DriskolFan"
model == "DriskolFan"
entities.append(
HubspaceFan(
hs, friendlyName, debug, childId, model, deviceId, deviceClass
Expand Down Expand Up @@ -407,7 +407,7 @@ def __init__(
self._temperature_choices = None

# https://www.homedepot.com/p/Commercial-Electric-5-in-6-in-Smart-Hubspace-Color-Selectable-CCT-Integrated-LED-Recessed-Light-Trim-Works-with-Amazon-Alexa-and-Google-538561010/314254248
if self._model == "538551010, 538561010, 538552010, 538562010" or self._model == "G19226":
if self._model == "538551010, 538561010, 538552010, 538562010" or self._model == "G19226" or self._model == "HB-10521-HS" or self._model == "17122-HS-WT":
self._supported_color_modes.extend(
[ColorMode.RGB, ColorMode.COLOR_TEMP, ColorMode.WHITE]
)
Expand Down Expand Up @@ -913,9 +913,9 @@ def update(self) -> None:
brightness = 51
elif fanspeed == "fan-speed-5-040":
brightness = 102
elif fanspeed == "fan-speed-5-060":
elif fanspeed == "fan-speed-5-60":
brightness = 153
elif fanspeed == "fan-speed-5-080":
elif fanspeed == "fan-speed-5-80":
brightness = 204
elif fanspeed == "fan-speed-100":
brightness = 255
Expand Down

0 comments on commit 409bb56

Please sign in to comment.