Skip to content

Commit

Permalink
Add support for LCA005 (#956)
Browse files Browse the repository at this point in the history
  • Loading branch information
sosheskaz committed Nov 25, 2023
1 parent c13fd2c commit 71a0196
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
7 changes: 3 additions & 4 deletions BridgeEmulator/HueObjects/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ def getV2Api(self):
"points_capable": self.protocol_cfg["points_capable"]}

# color lights only
if self.modelid in ["LST002", "LCT001", "LCT015", "LCX002", "915005987201", "LCX004", "LCX006"]:
if self.modelid in ["LST002", "LCT001", "LCT015", "LCX002", "915005987201", "LCX004", "LCX006", "LCA005"]:
colorgamut = lightTypes[self.modelid]["v1_static"]["capabilities"]["control"]["colorgamut"]
result["color"] = {
"gamut": {
Expand Down Expand Up @@ -638,13 +638,13 @@ def dynamicScenePlay(self, palette, index):
while self.dynamics["status"] == "dynamic_palette":
transition = int(30 / self.dynamics["speed"])
logging.debug("using transistiontime " + str(transition))
if self.modelid in ["LCT001", "LCT015", "LST002", "LCX002", "915005987201", "LCX004", "LCX006"]:
if self.modelid in ["LCT001", "LCT015", "LST002", "LCX002", "915005987201", "LCX004", "LCX006", "LCA005"]:
if index == len(palette["color"]):
index = 0
points = []
if self.modelid in ["LCX002", "915005987201", "LCX004", "LCX006"]:
gradientIndex = index
# for gradient lights
gradientIndex = index
for x in range(self.protocol_cfg["points_capable"]):
points.append(palette["color"][gradientIndex])
gradientIndex += 1
Expand Down Expand Up @@ -1906,4 +1906,3 @@ def save(self):
result["protocol"]=self.protocol
result["protocol_cfg"]=self.protocol_cfg
return result

9 changes: 9 additions & 0 deletions BridgeEmulator/lights/light_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@
lightTypes["LST002"]["config"] = {"archetype": "huelightstrip", "function": "mixed", "direction": "omnidirectional", "startup": {"mode": "safety", "configured": False}}
lightTypes["LST002"]["dynamics"] = {"speed": 0, "speed_valid": False, "status": "none", "status_values": ["none", "dynamic_palette"]}

## Hue White and Color Ambiance A19 800 Lumen
lightTypes["LCA005"] = {"v1_static": {"type": "Extended color light", "swversion":"1.104.2","swconfigid":"5419E9E3","productid":"Philips-LCA005-1-A19ECLv7","manufacturername": "Signify Netherlands B.V."}}
lightTypes["LCA005"]["v1_static"]["swupdate"] = {"state": "noupdates","lastinstall": "2020-12-09T19:13:52"}
lightTypes["LCA005"]["v1_static"]["capabilities"] = {"certified": True,"control": {"colorgamut": [[0.6915,0.3083],[0.17,0.7],[0.1532,0.0475]],"colorgamuttype": "C","ct": {"max": 500,"min": 153},"maxlumen": 800,"mindimlevel": 1000},"streaming": {"proxy": False,"renderer": True}}
lightTypes["LCA005"]["device"] = {"certified": True,"manufacturer_name": "Signify Netherlands B.V.","product_archetype": "sultan_bulb","product_name": "Hue color lamp","software_version": "1.104.2"}
lightTypes["LCA005"]["state"] = {"on": False, "bri": 200, "hue": 0, "sat": 0, "xy": [0.0, 0.0], "ct": 461, "alert": "none", "mode": "homeautomation", "effect": "none", "colormode": "ct", "reachable": True}
lightTypes["LCA005"]["config"] = {"archetype": "sultanbulb", "function": "mixed", "direction": "omnidirectional","startup":{"mode":"safety","configured": True}}
lightTypes["LCA005"]["dynamics"] = {"speed": 0, "speed_valid": False, "status": "none", "status_values": ["none", "dynamic_palette"]}

## Dimmable Hue Bulb
lightTypes["LWB010"] = {"v1_static": {"type": "Dimmable light", "swversion": "1.50.2_r30933", "manufacturername": "Signify Netherlands B.V.", "productid": "Philips-LWB010-1-A19DLv4"}}
lightTypes["LWB010"]["v1_static"]["swupdate"] = {"state": "noupdates","lastinstall": "2020-12-09T19:13:52"}
Expand Down

0 comments on commit 71a0196

Please sign in to comment.