From 409bb5655aef2267fa7bc7b2ee702fc9eedeb68a Mon Sep 17 00:00:00 2001 From: jdeath <17914369+jdeath@users.noreply.github.com> Date: Sun, 2 Jul 2023 07:17:10 -0400 Subject: [PATCH] Support 2 models of String Lights Support HB-10521-HS and maybe HB-17122-HS-WT Thanks @SmileyDan-84 --- custom_components/hubspace/light.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/custom_components/hubspace/light.py b/custom_components/hubspace/light.py index 9e6ab0e..949bac2 100644 --- a/custom_components/hubspace/light.py +++ b/custom_components/hubspace/light.py @@ -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) @@ -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 @@ -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 @@ -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] ) @@ -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