Skip to content

Commit

Permalink
Support LOM004 and LOM010 (#958)
Browse files Browse the repository at this point in the history
* Support LOM004 and LOM010

* Add logic forking
  • Loading branch information
sosheskaz authored Nov 25, 2023
1 parent 71a0196 commit f1a81fc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
6 changes: 3 additions & 3 deletions BridgeEmulator/HueObjects/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,12 +356,12 @@ def getV1Api(self):
result = lightTypes[self.modelid]["v1_static"]
result["config"] = self.config
result["state"] = {"on": self.state["on"]}
if "bri" in self.state and self.modelid not in ["LOM001"]:
if "bri" in self.state and self.modelid not in ["LOM001", "LOM004", "LOM010"]:
result["state"]["bri"] = self.state["bri"]
if "ct" in self.state and self.modelid not in ["LOM001", "LTW001"]:
if "ct" in self.state and self.modelid not in ["LOM001", "LOM004", "LOM010", "LTW001"]:
result["state"]["ct"] = self.state["ct"]
result["state"]["colormode"] = self.state["colormode"]
if "xy" in self.state and self.modelid not in ["LOM001", "LTW001", "LWB010"]:
if "xy" in self.state and self.modelid not in ["LOM001", "LOM004", "LOM010", "LTW001", "LWB010"]:
result["state"]["xy"] = self.state["xy"]
result["state"]["hue"] = self.state["hue"]
result["state"]["sat"] = self.state["sat"]
Expand Down
16 changes: 16 additions & 0 deletions BridgeEmulator/lights/light_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,22 @@
lightTypes["LOM001"]["config"] = {"archetype": "plug","function": "functional","direction": "omnidirectional","startup":{"mode": "safety","configured": True}}
lightTypes["LOM001"]["dynamics"] = {"status": "none", "status_values": ["none"]}

lightTypes["LOM004"] = {"v1_static": {"type": "On/Off plug-in unit","manufacturername": "Signify Netherlands B.V.","productname": "Hue Smart plug","swversion": "1.90.1","swconfigid": "A641B5AB","productid": "SmartPlug_OnOff_v01-00_01"}}
lightTypes["LOM004"]["v1_static"]["swupdate"] = {"state": "noupdates","lastinstall": "2020-12-09T19:13:52"}
lightTypes["LOM004"]["v1_static"]["capabilities"] = {"certified": True,"control": {},"streaming": {"renderer": False,"proxy": False}}
lightTypes["LOM004"]["device"] = {"certified": True,"manufacturer_name": "Signify Netherlands B.V.", "model_id": "LOM001", "product_archetype": "plug","product_name": "Hue Smart plug","software_version": "1.90.1"}
lightTypes["LOM004"]["state"] = {"on": False,"alert": "select","mode": "homeautomation","reachable": True}
lightTypes["LOM004"]["config"] = {"archetype": "plug","function": "functional","direction": "omnidirectional","startup":{"mode": "safety","configured": True}}
lightTypes["LOM004"]["dynamics"] = {"status": "none", "status_values": ["none"]}

lightTypes["LOM010"] = {"v1_static": {"type": "On/Off plug-in unit","manufacturername": "Signify Netherlands B.V.","productname": "Hue Smart plug","swversion": "1.90.1","swconfigid": "A641B5AB","productid": "SmartPlug_OnOff_v01-00_01"}}
lightTypes["LOM010"]["v1_static"]["swupdate"] = {"state": "noupdates","lastinstall": "2020-12-09T19:13:52"}
lightTypes["LOM010"]["v1_static"]["capabilities"] = {"certified": True,"control": {},"streaming": {"renderer": False,"proxy": False}}
lightTypes["LOM010"]["device"] = {"certified": True,"manufacturer_name": "Signify Netherlands B.V.", "model_id": "LOM001", "product_archetype": "plug","product_name": "Hue Smart plug","software_version": "1.90.1"}
lightTypes["LOM010"]["state"] = {"on": False,"alert": "select","mode": "homeautomation","reachable": True}
lightTypes["LOM010"]["config"] = {"archetype": "plug","function": "functional","direction": "omnidirectional","startup":{"mode": "safety","configured": True}}
lightTypes["LOM010"]["dynamics"] = {"status": "none", "status_values": ["none"]}


archetype = {"tableshade":"table_shade",
"flexiblelamp":"flexible_lamp",
Expand Down

0 comments on commit f1a81fc

Please sign in to comment.