Skip to content

Commit

Permalink
Merge pull request #5012 from manup/master
Browse files Browse the repository at this point in the history
Fix TRADFRI remote control arrow buttons hold/long release events
  • Loading branch information
manup authored Jun 13, 2021
2 parents 29ec9ff + 2e460a8 commit 21ed4d4
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,22 @@ void DeRestPluginPrivate::sendBasicClusterResponse(const deCONZ::ApsDataIndicati
break;

case 0x0001: // Application Version
{
stream << code;
stream << (quint8) deCONZ::Zcl8BitUint;
stream << (quint8) 0x00;

Sensor *sensor = getSensorNodeForAddressAndEndpoint(ind.srcAddress(), ind.srcEndpoint());
if (sensor && sensor->modelId() == QLatin1String("TRADFRI remote control"))
{
// Since firmware version 2.3.014 when the large middle button is pressed the remote reads this attribute.
// If it isn't 17 as reported by earlier remote firmware, the left/right buttons don't send hold and long press commands anymore.
stream << quint8(17);
}
else
{
stream << quint8(0x00);
}
}
break;

case 0x0002: // Stack Version
Expand Down

0 comments on commit 21ed4d4

Please sign in to comment.