Skip to content
This repository has been archived by the owner on Jul 23, 2021. It is now read-only.

Commit

Permalink
Add support for Hue Smart Button
Browse files Browse the repository at this point in the history
Add support for Hue Smart Button
  • Loading branch information
cyr-ius authored Nov 17, 2019
1 parent 0501a2c commit da1c993
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions custom_components/huesensor/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
ICONS = {
"SML": "mdi:run",
"RWL": "mdi:remote",
"ROM": "mdi:remote",
"ZGP": "mdi:remote",
"FOH": "mdi:light-switch",
}
Expand All @@ -43,6 +44,7 @@
"threshold",
],
"RWL": ["last_updated", "battery", "on", "reachable"],
"ROM": ["last_updated", "battery", "on", "reachable"],
"ZGP": ["last_updated"],
"FOH": ["last_updated"],
}
Expand All @@ -55,9 +57,9 @@ def parse_hue_api_response(sensors):
# Loop over all keys (1,2 etc) to identify sensors and get data.
for sensor in sensors:
modelid = sensor["modelid"][0:3]
if modelid in ["RWL", "SML", "ZGP"]:
if modelid in ["RWL", "ROM", "SML", "ZGP"]:
_key = modelid + "_" + sensor["uniqueid"][:-5]
if modelid == "RWL":
if modelid == "RWL" or modelid == "ROM":
data_dict[_key] = parse_rwl(sensor)
elif modelid == "ZGP":
data_dict[_key] = parse_zgp(sensor)
Expand Down

0 comments on commit da1c993

Please sign in to comment.