Skip to content

Commit

Permalink
Detect IKEA light by manufacturer code in additon to MAC prefix
Browse files Browse the repository at this point in the history
Recent light/firmware combos have a different MAC prefix (0x90fd9f) compared
to the hardcoded 'ikeaMacPrefix' (0x000b57), so use the manufacturer code
as an additional criteria to detect IKEA lights.
  • Loading branch information
lbschenkel authored and manup committed Aug 6, 2018
1 parent 4ac34c8 commit 9f71d29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zcl_tasks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ bool DeRestPluginPrivate::addTaskSetColorTemperature(TaskItem &task, uint16_t ct
// workaround IKEA move to color temperature is broken and won't update x,y values
// which results in broken scenes
// instead transform into a move to color x,y task
if ((task.lightNode->address().ext() & macPrefixMask) == ikeaMacPrefix)
if (task.lightNode->manufacturerCode() == VENDOR_IKEA || (task.lightNode->address().ext() & macPrefixMask) == ikeaMacPrefix)
{
quint16 x;
quint16 y;
Expand Down

0 comments on commit 9f71d29

Please sign in to comment.