@@ -520,12 +520,6 @@ void OnOffServer::initOnOffServer(chip::EndpointId endpoint)
520
520
status = setOnOffValue (endpoint, onOffValueForStartUp, true );
521
521
}
522
522
523
- #if defined(MATTER_DM_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS
524
- // Registers Scene handlers for the On/Off cluster on the server
525
- app::Clusters::ScenesManagement::ScenesServer::Instance ().RegisterSceneHandler (endpoint,
526
- OnOffServer::Instance ().GetSceneHandler ());
527
- #endif // defined(MATTER_DM_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS
528
-
529
523
#ifdef MATTER_DM_PLUGIN_MODE_SELECT
530
524
// If OnMode is not a null value, then change the current mode to it.
531
525
if (onOffValueForStartUp && emberAfContainsServer (endpoint, ModeSelect::Id) &&
@@ -542,6 +536,12 @@ void OnOffServer::initOnOffServer(chip::EndpointId endpoint)
542
536
}
543
537
#endif // IGNORE_ON_OFF_CLUSTER_START_UP_ON_OFF
544
538
539
+ #if defined(MATTER_DM_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS
540
+ // Registers Scene handlers for the On/Off cluster on the server
541
+ app::Clusters::ScenesManagement::ScenesServer::Instance ().RegisterSceneHandler (endpoint,
542
+ OnOffServer::Instance ().GetSceneHandler ());
543
+ #endif // defined(MATTER_DM_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS
544
+
545
545
emberAfPluginOnOffClusterServerPostInitCallback (endpoint);
546
546
}
547
547
@@ -973,8 +973,8 @@ static inline void unreg(OnOffEffect * inst)
973
973
974
974
OnOffEffect::OnOffEffect (chip::EndpointId endpoint, OffWithEffectTriggerCommand offWithEffectTrigger,
975
975
EffectIdentifierEnum effectIdentifier, uint8_t effectVariant) :
976
- mEndpoint(endpoint),
977
- mOffWithEffectTrigger(offWithEffectTrigger), mEffectIdentifier(effectIdentifier), mEffectVariant(effectVariant)
976
+ mEndpoint(endpoint), mOffWithEffectTrigger(offWithEffectTrigger), mEffectIdentifier(effectIdentifier),
977
+ mEffectVariant(effectVariant)
978
978
{
979
979
reg (this );
980
980
};
0 commit comments