Skip to content

Commit 30de319

Browse files
committed
Fix for group on/off command (dimmers)
1 parent 5781353 commit 30de319

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

main/mainworker.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10759,15 +10759,11 @@ bool MainWorker::SwitchScene(const unsigned long long idx, const std::string &sw
1075910759
bool bHaveGroupCmd=false;
1076010760
int maxDimLevel=0;
1076110761

10762-
if (scenetype == SGTYPE_SCENE)
10763-
{
10764-
//Scene
10765-
GetLightStatus(dType, dSubType, switchtype, cmd, sValue, lstatus, llevel, bHaveDimmer, maxDimLevel, bHaveGroupCmd);
10766-
}
10767-
else
10762+
GetLightStatus(dType, dSubType, switchtype, cmd, sValue, lstatus, llevel, bHaveDimmer, maxDimLevel, bHaveGroupCmd);
10763+
10764+
if (scenetype == SGTYPE_GROUP)
1076810765
{
10769-
//Group
10770-
lstatus = ((lstatus == "On") || (lstatus == "Group On") || (lstatus == "Chime") || (lstatus == "All On")) ? "On" : "Off";
10766+
lstatus = ((switchcmd == "On") || (switchcmd == "Group On") || (switchcmd == "Chime") || (switchcmd == "All On")) ? "On" : "Off";
1077110767
}
1077210768
_log.Log(LOG_NORM, "Activating Scene/Group Device: %s (%s)", DeviceName.c_str(), lstatus.c_str());
1077310769

0 commit comments

Comments
 (0)