Skip to content

Commit c69d23f

Browse files
committed
skip finding another move if only 1 move is available for a trigger
1 parent e494bea commit c69d23f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Backend/sensors.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ abstract class TriggerDefinition extends ChangeNotifier implements Comparable<Tr
248248
actionsToRun.add(baseAction);
249249
}
250250
//only adding a check here
251-
if (baseAction != null && ((baseAction is CommandAction && hasLegacyEars) || !baseAction.deviceCategory.toSet().containsAll(flattenedDeviceTypes) || (baseAction is EarsMoveList && !hasLegacyEars))) {
251+
if (baseAction != null && moveActions.length > 1 && ((baseAction is CommandAction && hasLegacyEars) || !baseAction.deviceCategory.toSet().containsAll(flattenedDeviceTypes) || (baseAction is EarsMoveList && !hasLegacyEars))) {
252252
// find the missing device type
253253
// The goal here is if a user selects multiple moves, send a move to all gear
254254
final Set<DeviceType> missingGearAction = baseAction.deviceCategory

0 commit comments

Comments
 (0)