@@ -10634,7 +10634,7 @@ bool MainWorker::DoesDeviceActiveAScene(const unsigned long long DevRowIdx, cons
10634
10634
sstr >> aID;
10635
10635
if (aID == DevRowIdx)
10636
10636
{
10637
- if ((SceneType == 1 ) || (sCode .empty ()))
10637
+ if ((SceneType == SGTYPE_GROUP ) || (sCode .empty ()))
10638
10638
return true ;
10639
10639
int iCode = atoi (sCode .c_str ());
10640
10640
if (iCode == Cmnd)
@@ -10701,7 +10701,7 @@ bool MainWorker::SwitchScene(const unsigned long long idx, const std::string &sw
10701
10701
std::string camidx=sd[0 ];
10702
10702
int delay=atoi (sd[1 ].c_str ());
10703
10703
std::string subject;
10704
- if (scenetype== SGTYPE_SCENE)
10704
+ if (scenetype == SGTYPE_SCENE)
10705
10705
subject=Name + " Activated" ;
10706
10706
else
10707
10707
subject=Name + " Status: " + switchcmd;
@@ -10759,15 +10759,11 @@ bool MainWorker::SwitchScene(const unsigned long long idx, const std::string &sw
10759
10759
bool bHaveGroupCmd=false ;
10760
10760
int maxDimLevel=0 ;
10761
10761
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)
10768
10765
{
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" ;
10771
10767
}
10772
10768
_log.Log (LOG_NORM, " Activating Scene/Group Device: %s (%s)" , DeviceName.c_str (), lstatus.c_str ());
10773
10769
@@ -10856,7 +10852,7 @@ void MainWorker::CheckSceneCode(const unsigned long long DevRowIdx, const unsign
10856
10852
s_str >> ID;
10857
10853
int scenetype = atoi (sd[2 ].c_str ());
10858
10854
10859
- if ((scenetype == 0 ) && (!sCode .empty ()))
10855
+ if ((scenetype == SGTYPE_SCENE ) && (!sCode .empty ()))
10860
10856
{
10861
10857
// Also check code
10862
10858
int iCode = atoi (sCode .c_str ());
0 commit comments